menu
 
Version
2019.2.15.7667

2024.1.6.8842

2023.1.14.8770

2025.1.0.8897

2022.1.19.8584

2021.1.14.8108

2019.2.15.7667

2019.1.11.7296

2018.1.11.6987

2017.2.10.6745

2017.1.9.6501

2016.2.6.6153

2015.1.9.5624

menu

Wwise Unity Integration Documentation
Using AkEnvironment and AkEnvironmentPortal from the Inspector (Reverb Zones)

Wwise implements Reverb Zones by using an Auxiliary Bus to host the reverb effect. Reverb Zones are not limited to using reverb effects because you can place any Wwise Effect on an Auxiliary Bus.

An AkEnvironment component embodies a very simple environment zone. You can attach an AkEnvironment to any type of collider. To add an AkEnvironment to your scene:

  • Using the Wwise Picker. This is the simplest way to add an AkEnvironment. Drag an AuxBus from the Wwise Picker window to an object in the Unity Viewer or the Inspector. This will automatically create an AkEnvironment component on the target Game Object.
  • Using the "Add Component" menu. Add an AkEnvironment component to any Unity Game Object. Select the desired environment from the selector in the inspector.
  • Using scripts. You can call AkSoundEngine.SetGameObjectAuxSendValues() at any time from a C# script.

We also have portals which can be used to combine the effects of two environments. The contribution of each of the two environments is relative to their distance from the game object. This is useful if a game object is standing between two rooms or in a tunnel connecting two environments.

  • To add an environment portal to your project, go to GameObject > Wwise > Environment Portal in Unity's menu bar.

To use environments and environment portals, you need a game object with an AkGameObj component that is environment-aware. AkEnvironmentPortal objects will automatically detect AkEnvironment objects that overlap it. The overlapping environments will appear in the two select-lists in the portal's inspector. If too many environments overlap the portal, you can select which ones the portal will mix together.

In the Wwise Unity Integration, only 4 AkEenvironments can be active at the same time. Those 4 AkEnvironments are selected as follows:

  • The environments that are connected to a portal and that have the highest priority are selected until we reach 4 environments or until there are no more environments connected to a portal.
  • If we still don't have 4 selected environments, we select the environments that are not connected to a portal as follows:
    • Environments with the highest priority will be selected until we reach 4 environments (if the Default and Exclude Others flags are not set).
    • A Default environment will be selected only if no other environment is selected.
    • If your game object is inside an environment with the Exclude Others flag, then it will be selected and all other environments will get discarded.
  • AkEnvironment component: Only 4 environments can be active at the same time.
    • Priority: Defines the priority of an environment. A smaller number has a higher priority.
      If a game object is inside more than 4 environments, only the 4 environments with the highest priority will be active (if the Default and Exclude Others flags are not set).
    • Default: A default environment will be active only if it's the only environment containing your game object.
      If your game object is inside more than one default environment, then only the one with the highest priority will be active.
    • Exclude Others: An environment with this flag can't be overlapped by other environments.
      If your game object is inside an environment with the Exclude Others flag, then all other environments will get discarded.
      If your game object is inside more than one environment with the Exclude Others flag, only the one with the highest priority will be active.
    • AuxBus Name: Specifies the name of the current AuxBus. To select an AuxBus, click on the current AuxBus's name to open the AuxBus picker window. Then, you can either click on an AuxBus and click on the OK button or double-click an AuxBus to select it. You can also drag an AuxBus from the Wwise picker and drop it on the current AuxBus's name to select a new one.
  • AkEnvironmentPortal component: You can create an environment portal in Unity by going to GameObject > Wwise > Environment Portal.
    You can place an environment portal between two environments to combine their effects while your game object is inside the portal. The portal must intersect with both environments for this to work.
    The contribution of each of the two environments is relative to their distance from the game object. The closer the game object is from an environment, the more that environment will contribute towards the final effect.
    • Environment #1: The portal will automatically detect all environments that intersect the portal. Of those environments, the ones that are placed on the negative side of the portal (opposite to the direction of the chosen axis) will be available in the drop down menu. The reason the environments are sorted this way is to reduce the computation needed to determine the contribution of each environment at runtime.
    • Environment #2: The portal will automatically detect all environments that intersect the portal. Of those environments, the ones that are placed on the positive side of the portal (same direction as the chosen axis) will be available in the menu. The reason the environments are sorted this way is to reduce the computation needed to determine the contribution of each environment at runtime.
    • Axis: The axis is used to find the contribution of each environment. For example, if the z axis is chosen, then moving along the x axis won't have any effect on the contribution of each environment. Only movement on the z axis will have an effect on their contribution.
      info Note: The axis is in object space. So, rotating the portal will also rotate the axis.
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