Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

+2 votes

I'm having some trouble with posting a Wwise event to Global Scope from Unity.
I'm using Unity 2022.3.5 and Wwise Integration 2022.1.6.8263.2826.

IIRC, doing something like:

  • AkSoundEngine.PostEvent("Test", null);

With "null" as the in_gameObjectID parameter should post the event to Global Scope.
But I just tested this on a new Unity 2022 project, and this isn't working anymore.

This issue contradicts the following info from the Wwise docs (API Changes and Limitations)
https://www.audiokinetic.com/en/library/edge/?source=Unity&id=pg_limitations.html

  • PostEvent() and GameObject-related APIs now accept null as the GameObject input argument to affect the global scope.

If I set a Unity GameObject on the in_gameObjectID parameter, the event plays correctly.
But if I set the parameter to null, the following errors appear in the Unity console:

Wwise: Invalid parameter in_GameObj in function call AK::SoundEngine::RegisterGameObj
UnityEngine.Debug:LogError (object)
AkCallbackManager:PostCallbacks () (at Assets/Wwise/API/Runtime/Handwritten/Common/AkCallbackManager.cs:392)
AkSoundEngineController:LateUpdate () (at Assets/Wwise/MonoBehaviour/Runtime/AkSoundEngineController.cs:81)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
Wwise: Unknown/Dead game object ID used in function PostEvent. Make sure the game object is registered before using it and do not use it once it was unregistered. Name: 3157003241
UnityEngine.Debug:LogError (object)
AkCallbackManager:PostCallbacks () (at Assets/Wwise/API/Runtime/Handwritten/Common/AkCallbackManager.cs:392)
AkSoundEngineController:LateUpdate () (at Assets/Wwise/MonoBehaviour/Runtime/AkSoundEngineController.cs:81)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
Wwise: Invalid parameter in_GameObj in function call AK::SoundEngine::UnregisterGameObj
UnityEngine.Debug:LogError (object)
AkCallbackManager:PostCallbacks () (at Assets/Wwise/API/Runtime/Handwritten/Common/AkCallbackManager.cs:392)
AkSoundEngineController:LateUpdate () (at Assets/Wwise/MonoBehaviour/Runtime/AkSoundEngineController.cs:81)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

Potentially related issue:
https://www.audiokinetic.com/qa/11403/getglobalvalue-not-working-unity-2021-wwise-2022-8100-2644

in General Discussion by Andrei M. (740 points)

Please sign-in or register to answer this question.

...