版本

menu_open
Wwise Unity Integration Documentation
在 Inspector 中使用 AkGameObj

The AkGameObj component acts as a bridge between Unity game objects and Wwise objects. You can use an AkGameObj to track the position of a sound object in Unity and use it for game syncs such as Switches, RTPCs, and environmental values.

Any object that is passed to Wwise, including any object with an AkAudioListener, requires an AkGameObj. When you add such a component to a Unity Game Object in the Inspector, an AkGameObj is automatically added as well. All objects that have AkGameObj components are registered in Wwise and then unregistered according to the lifetime of the Unity object.

When using game-defined auxiliary sends, ensure that both the emitter (which has both AkGameObj and AkEvent components) and the AkEnvironment components have colliders. The colliders are necessary for the AkEnvironment component to detect the emitter game object and for its signal to be sent to the corresponding Auxiliary Bus.

  • Apply Position Offset: Applies a second Transform to the game object, to specify an audio calculation position different from the game object's actual position.
    • Position Offset: Moves the position of the game object's second Transform according to game units entered in each of the X (left-right), Y (up-down), and Z (front-back) fields.
    • Hide Main Transform: Removes the original Transform from view, so only the offset one is visible.
  • Environment Aware: Determines whether the audio of the game object is affected by the environment, rooms, and portals. When enabled, the AkGameObj must have a Rigidbody. This option only has an effect if selected before the scene plays.
    • Add Rigidbody: Creates a Rigidbody component on the GameObject.
  • Use Default Listeners: Default Listeners are typically applied to central objects, such as a camera. 它将监听所有未绑定听者的游戏对象。
    • Add Listener: Specifies another listener entry. Click to open the Select AkAudioListener dialog, then select a game object that has an AkAudioListener.
      备注:必须至少存在一个听者。If you do not use the default listeners or specify another one, ensure that Automatically add Listener to Main Camera is selected in the the Wwise Integration settings (see Adjusting Unity Editor Settings).
  • Attenuation Scaling Factor: The Attenuation Scaling Factor of the game object.
    参见
  • Using AkEnvironment and AkEnvironmentPortal from the Inspector
  • Integrating Listeners (SDK documentation)

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅