Version

menu_open
Wwise Unity Integration Documentation
Using AkAmbient from the Inspector
Note:AkAmbient builds on AkEvent by allowing multipositioning.
  • Trigger On: Provides a list of Unity events that can trigger your Wwise Event. You can choose more than one Unity event, in which case the field will display as "Mixed…". You can choose more than one Unity event, in which case the field will display as "Mixed…". You are not limited to those events. You can trigger an event at any time by calling AkSoundEngine.PostEvent anywhere in your code. You can also code your own triggers, so they appear in the list for your co-workers. See Adding New Triggers for Wwise Events.
  • Action On Event: Enables users to override some Event parameters defined in Wwise directly from Unity. This allows the reuse of existing Events insted of creating new ones.
    Unchecked means you will post the Event. If you enable Action On Event, then you cannot enable Use Callback. See also the SDK documentation's entry for AK::SoundEngine::ExecuteActionOnEvent.
    • Action On Event Type: Overrides the Action type of the Event.
    • Curve Interpolation: Overrides the interpolation curve.
    • Fade Time: Overrides the sound's fade time.
  • Use Callback: Provides an easy way to make a game object react to an event callback. If you enable Action On Event, then you cannot enable Use Callback.
    • Game Object: The game object that will receive the callback. To select a game object, drag it from the hierarchy and drop it in the game object field.
    • Callback Function: This is the function that will get called by Game Object when the callback happens. To select a function, type its name in the Callback Function text field. For this to work, Game Object must define Callback Function in one of its components. The function must only receive one AkEventCallbackMsg argument.
    • Callback Flags: Select a flag which specifies when Callback Function will be called. More than one flag can be selected at the same time. See the AkCallbackType enumeration in the Wwise SDK documentation for more information about each flag.
    • Add: Creates a new callback.
  • Play / Stop: Can be used to preview the Wwise Event when in Edit mode.
  • Stop All: Stops all currently playing Wwise Events.
  • Position Type: Defines the way the Event's position will be sent to the audio engine.
    • Simple_Mode: The Event's position will be the same as the game object to which it's attached.
    • Large_Mode: The Event can have multiple positions that are defined by a set of points. You can add a point by clicking the Add Large Mode position object in the inspector. It will add a child game object to the AkAmbient game object and you can use normal transform tools to move it around. You can also use existing game objects by manually adding an AkAmbientLargeModePositioner component and then clicking Pick existing position object in the inspector. This mode is useful when a sound is coming from multiple positions at the same time; the sound of water in the middle of the ocean is a good example.
    • MultiPosition_Mode: This mode enables us to have only one instance of a sound for all instances of AkAmbient using the same Event in order to save memory. All AkAmbient instances that are using this mode and that have the same event will automatically get detected and the same sound instance will be used for all of them instead of loading the same sound multiple times.
      Note:All AkAmbient instances in this mode and with the same event will have the same trigger (see Trigger On in AkEvent). So, changing the trigger of one AkAmbient will automatically change the trigger of all the others with the same event.
  • Show Attenuation Sphere: Shows a sphere that defines the space where the sound played by an event can be heard. You will not, however, see it when you Play in Editor.
    For this to work you need to enable Max Attenuation in the SoundBank settings in your Wwise project (Project > Project Settings > Soundbanks > Max attenuation).
    • Dont_Show: No attenuation sphere is shown.
    • Current_Event_Only: Shows the attenuation spheres for all the sounds that would be played after a call to AkSoundEngine.PostEvent while in the current mode.
      • If in Simple_Mode, then only the attenuation sphere of the sound coming from the game object is shown.
      • If in Large_Mode, then an attenuation sphere is shown for each point.
      • If in MultiPosition_Mode, then an attenuation sphere is shown for every other AkAmbient in MultiPosition_Mode with the same event.
    • All_Events: Shows the attenuation sphere of all AkAmbient instances in the scene.
  • Name: Click to select the Event from those already defined in WwiseProject > Events. To add a new Event, you can click the Create new 'Event' button within the Wwise Project Explorer's Events tab.
Note:For Large_Mode and MultiPosition_Mode position types, there are a few limitations that need to be taken into consideration. Sounds should not be triggered in Awake, since the call to AkSoundEngine.SetMultiplePositions occurs later. These two multipositioning modes work for stationary objects. It is strongly recommended that the owning UnityEngine.GameObjects are set as static.
See also

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise