Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

In Unity, can I have the WWiseGlobal / AkInitializer object in a prefab?

+1 vote
I am trying to add the AkInitializer that Wwise requires to a prefab but the Wwise editor code keeps removing the AkInitializer object from the prefab and seems to prefer to add a new WwiseGlobal object to the scene. I've unticked "Create WwiseGlobal GameObject" in the project settings, which does prevent new objects being created, but the AkInitializer component on my prefab still keeps getting removed.
asked Apr 3, 2023 in General Discussion by Max A. (110 points)
Just ran into this as well-- so irritating. I assume it's a bug. AkInitializer destroys itself in its Awake if there's another instance in existence (which seems like a bad idea to begin with; why not just show an error message?), *but* if you open a prefab that contains an AkInitializer, and the scene you're in ALSO contains one, then there are now two instances--one in the scene and one in the prefab stage--so the one in the prefab gets silently deleted.

The worst part is there's no indication to the user that this has happened. The prefab just silently gets modified and thus audio mysteriously stops working.

Please sign-in or register to answer this question.

...