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.

0 votes
I have worked with Wwise in Unity for a bit and every time I make a change in a script, Unity Realoads script assemblies and after that, no sound is playing when starting the game. But active events queues up and playes all of them when exit playmode.
I did some digging and found out that "ms_Instance" in AkInitializer.cs is null. The Awake function that sets "ms_Instance = this" is only calles when exiting playmode and when starting up Unity. (I guess since it has "[UnityEngine.ExecuteInEditMode]"). It works fince as long as I dont change code and restarting the game fixes the problem as well.
Though restarting the game to hear sound every time I change the code is pretty anoying.

I solved it by adding

if (ms_Instance == null)
{
            Awake();
}

before

if (ms_Instance == this)
            AkSoundEngineController.Instance.Init(this);

inside "OnEnable". But I think that I probably did something wrong for this to happen I shouldnt have to fix it this way. No clue though.
in General Discussion by Jonas N. (100 points)

Please sign-in or register to answer this question.

...