Version

menu_open
Wwise Unity Integration Documentation
Using the Wwise Unity Integration

The Integration provides Wwise-specific components you can use directly on Unity Scene GameObjects. These components should cover most sound design scenarios. While the components are custom C# scripts, no coding is required to edit their public properties.

Adding Wwise Components

To add Wwise components to Unity GameObjects:

  • Go to the Unity Inspector window (Ctrl+3) loaded with the GameObject selected in the scene.
  • Click Add Component to prompt the Component list.
  • Select Wwise to open its sublist and choose the desired Wwise Components.
    Tip:Type "ak" in the component search field to more quickly access a list containing all the Wwise components.

Adding Wwise Components from the Wwise Picker

You can add components to your game by dragging Wwise objects from the Wwise Picker to either the Inspector or onto game objects listed in the Hierarchy of your loaded scene.

See also

The WwiseGlobal Object

The WwiseGlobal object is a GameObject that contains the Initializing and Terminating scripts for the Wwise Sound Engine. In the Editor workflow, it is added to every scene, so that it can be properly previewed in the Editor. In the game, only one instance is created, in the first scene, and it is persisted throughout the game. There are a few customizable options in the initializer script.

If you want to disable this behavior, use Edit > Project Settings > Wwise Editor and disable Create WwiseGlobal GameObject. It then becomes your responsability to add the initializer script on an object that will persist throughout the game.

Listener in Main Camera

In order for positioning to work, the Ak Audio Listener script needs to be attached to the main camera in every scene. By default the listener is added automatically to the main camera. If you want to disable this behavior, go to Edit > Project Settings > Wwise Editor and disable Automatically add Listener to Main Camera.

See also

Wwise Types

This integration also provides a few classes that can be used, with minimal code, for most remaining usage scenarios:

See also

Wwise Authoring API (WAAPI) Client

A native WAAPI client with a C# API allows you to connect to WAAPI from within Unity. It currently is available for Windows and macOS. The Wwise Authoring API sends messages via JSON objects. In Unity, the client was implemented using strings. You may use your preferred method to construct valid JSON strings to then give to the WAAPI client.

See also

Adding Wwise Sounds to Game Objects

There are four ways to add sounds to your game:

  • Using the Wwise Picker. This is the simplest way to add a sound to an object. Drag an Event from the Wwise Picker window to an object in the Unity Viewer or the Inspector. This automatically creates an AkAmbient component on the target Game Object.
  • Using the Add Component menu. Add an AkAmbient or an AkEvent component to any Unity Game Object.
  • Using Wwise Types. Call AK.Wwise.Event.Post() at any time from a C# script.
  • Using scripts. Call AkSoundEngine.PostEvent() at any time from a C# script.
See also

Using Wwise with Unity Timeline

For Unity's Timeline feature, there are custom Wwise tracks for triggering Wwise events and setting Wwise RTPC values.

When Wwise sound objects are part of an audio timeline in Unity, applying Initial Delays to those sounds can be problematic. For example, if you use a seek, the seek is done in the silence generated to create the Initial Delay instead of in the sound itself, so the sound starts from the beginning of the file and not from the specified timestamp. To start sounds after a delay, use the Unity Timeline instead of a Wwise Initial Delay: move the clip to the desired timestamp in the Timeline.

See also

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