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 :

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. In the integration Wwise Project, we added a dialogue.
    1. Import a sound into it.
    2. In the Sound Property Editor's
      1. General Settings tab, enable Use game-defined auxiliary sends.

        SoundPropertyEditorGeneralSettings.png
        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.

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

    EventEditor.png
    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 should look in the integration Wwise Project:

    SoundBank.png
    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.

WwisePicker.png
Wwise Picker

3.A. Environment

  1. Create a floor, walls, and ceilings using cubes: GameObject > 3D Object > Cube.
    Object Name Position Rotation Scale
    Floor (0, 0, 0) (0, 0, 0) (50, 0.5, 50)
    Wall Front Left (-4.5, 3, -10) (0, 0, 0) (7, 6, 0.5)
    Wall Front Middle (0, 5, -10) (0, 0, 0) (2, 2, 0.5)
    Wall Front Right (2.5, 3, -10) (0, 0, 0) (3, 6, 0.5)
    Wall Left Small (-7.75, 3, -6) (0, 0, 0) (0.5, 6, 8)
    Wall Back Small (-2, 3, -2) (0, 0, 0) (12, 6, 0.5)
    Ceiling Small (-2, 5.75, -6) (0, 0, 0) (12, 0.5, 8)
    Wall Right Small (3.75, 3, -8) (0, 0, 0) (0.5, 6, 3.5)
    Wall Front Large (11.5, 3, -7.5) (0, 0, 0) (16, 6, 0.5)
    Wall Right Large (19.25, 3, 3.25) (0, 0, 0) (0.5, 6, 21.5)
    Wall Middle (3.75, 5, -4.5) (0, 0, 0) (0.5, 2, 3.5)
    Wall Left Large (3.75, 3, 5.625) (0, 0, 0) (0.5, 6, 16.75)
    Wall Back Large (11.5, 3, 14) (0, 0, 0) (16, 6, 0.5)
    Ceiling Large (11.5, 5.75, 3.25) (0, 0, 0) (16, 0.5, 22)
    Barrier (-4.5, 3, -17) (0, 0, 0) (7, 6, 0.5)
  2. Add spotlights inside rooms ( GameObject > Light > Spotlight ).
    Object Name Position Rotation Scale
    Spotlight Small Room (-3, 5.75, -6) (0, 0, 0) (1, 1, 1)
    Spotlight Large Room (11.5, 5.75, 5) (0, 0, 0) (1, 1, 1)
    1. In the Light component, change:
      1. Range to 30.
      2. Spot Angle to 179.

3.B. Character Listener

  1. Create a character with the method of your choice.
    Object Name Position Rotation Scale
    MainCharacter (0, 1.3, -20) (0, 0, 0) (1, 1, 1)
    1. Remove any Unity Audio Source.
    2. Add an Ak Audio Listener component to the camera.

      AkAudioListener.png
      Ak Audio Listener component
    3. Add an Ak Spatial Audio Listener component to the camera.

      AkSpatialAudioListener.png
      Ak Spatial Audio Listener component

3.C. Third-Person Emitters

  1. Create buttons using cylinders ( GameObject > 3D Object > Cylinder ).
    Object Name Position Rotation Scale
    Button Outside (-3, 0.75, -15) (0, 0, 0) (0.15, 0.5, 0.15)
    Button Small Room (-3, 0.75, -5) (0, 0, 0) (0.15, 0.5, 0.15)
    Button Large Room (7.5, 0.75, 5) (0, 0, 0) (0.15, 0.5, 0.15)
  2. Add an Ak Spatial Audio Emitter component.
    AkSpatialAudioEmitterDefault.png
    Ak Spatial Audio Emitter component
  3. In the Ak Game Obj component:
    1. Enable the Environment Aware option.
    2. Enable the Use Default Listener option.
      AkGameObj.png
      Ak Game Obj component
  4. Add an Ak Ambient component:
    1. Choose your preferred way to start the sound in Trigger On.
    2. Choose the Play_sound Event in Event Name.
      AkAmbient.png
      Ak Ambient component
  5. Add an Ak Bank component:
    1. Add the SoundBank created in 2. Wwise Project Preparation to Bank Name.
      AkBank.png
      Ak Bank component
  6. Start the game, connect it to Wwise, and open the Profiler layout (shortcut F6).
  7. Play the sound from a button. You should hear the sound you imported in the Wwise project.
  8. In the Voices Graph tab, you should see the following graph.
    VoiceGraph.png
    Button Outside Voice Graph with no Effect

3.D. Scene

  1. Save your Scene to a convenient place.
  2. The final look of the scene is shown in the following image. This scene is available with the Unity integration package. Colors were added to elements of the scene for convenience. A mobile first-person controller was also added.
    SceneComplete.png
    Tutorial Unity Scene

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