Version

menu_open
Wwise Unity Integration Documentation
Preparation for the Spatial Audio Tutorials

The following steps must be followed beforehand to successfully complete the Surface Reflectors Tutorial and the Rooms and Portals Tutorial :

Note: If you don't want to start a new project from scratch, you can download the Wwise Unity Demo Scene. It contains a scene, called SpatialAudioTutorial, with all the steps from the tutorials.

1. Create a Unity Project

Using the latest version of Wwise and Unity, follow the steps below in order to build your working environment.

  1. Launch Unity and create a new project.
  2. Close Unity.
  3. Start the Wwise Launcher and integrate Wwise into your Unity project.

2. Wwise Project Preparation

For the tutorials, you will need a Sound SFX, an Event to play it, and a SoundBank.

  1. From the Launcher, open your project in Wwise.
  2. Add a Sound SFX under the Actor Mixer Hierarchy's Default Work Unit.
    1. Import a sound into it.
    2. In the Sound Property Editor's
      1. General Settings tab, enable Use game-defined auxiliary sends.

        Sound Property Editor General Settings tab
      2. Positioning tab, enable Listener Relative Routing and select Position + Orientation for the 3D Spatialization. Optionally, add an Attenuation.

        Sound Property Editor Positioning tab
  3. Right-click on the Sound SFX within the Actor-Mixer Hierarchy, then select New Event > Play.

    Event Editor
  4. Go to the SoundBank layout (shortcut F7) and add a new SoundBank. Drag the Event into the new SoundBank. Here's how the SoundBank Manager look in the Wwise Unity Demo Scene Project:

    SoundBank Manager and Editor
  5. Save your project.

3. Unity Project Preparation

In this section we will create our game area and the objects in it. We will need a listener, emitters, and two rooms.

From the Launcher, open your project in Unity. Open the Wwise Picker (Windows > Wwise Picker), Refresh Project, and Generate SoundBanks.

Wwise Picker
  1. Create a character with the method of your choice.
    1. Remove any Unity Audio Source.
    2. Add an AkAudioListener component to the camera.
      AkAudioListener component
    3. Add an AkSpatialAudioListener component to the camera.
      AkSpatialAudioListener component
  2. Create a floor, a building with two rooms and an obstacle outside using your preferred method.
    In the Wwise Unity Demo Scene, we used a mesh for the building and cubes for the floor and obstacle ( GameObject > 3D Object > Cube ).

    Tutorial Unity Scene
  3. Create emitters with the method of your choice. In the Wwise Unity Demo Scene, we created buttons using cylinders ( GameObject > 3D Object > Cylinder ). We added a button outside and inside each room.

    For each emitter:
    1. Add an AkSpatialAudioEmitter component.
      AkSpatialAudioEmitter component
    2. In the AkGameObj component (added automatically after adding an AkSpatialAudioEmitter):
      1. Enable the Environment Aware option.
      2. Enable the Use Default Listener option.
        AkGameObj component
    3. Add an AkAmbient component:
      1. Choose your preferred way to start the sound in Trigger On.
      2. Choose the Event in Event Name.
        AkAmbient component
    4. Add an AkBank component:
      1. Add the SoundBank created in the previous section to Bank Name.
        AkBank component

4. Verify your Setup

  1. Start the game and connect it to Wwise,
    1. Open the Profiler layout (shortcut F6).
      1. Play the sound from a button. You should hear the sound you imported in the Wwise project.
      2. In the Voices Graph tab, you should see the following graph:
        Button Outside Voice Graph with no Effect
      3. In the Profiler settings, reachable from the gear icon in the top right corner of the Advanced Profiler view, make sure Spatial Audio is selected to be able to see Spatial Audio drawings in the Game Object 3D Viewer (next step).
        Profiler Settings
    2. Open the Game Object Profiler Layout (shortcut F12)
      1. Add all the emitters and the listener to the watch list.
      2. In the Game Object 3D Viewer, you should see that all your game objects are spatial audio objects. Their icon have an additional white dot on the top right corner.
        Game Object 3D Viewer
  2. Save your Scene to a convenient place.

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise