Wwise in editor mode changes:
IMPORTANT: Don't forget to add WWISE_EDITOR_PREVIEW
in Build Settings -> Player Settings -> Scripting Define Symbols to enable Wwise support.
- Add this code to
AkBank.cs
:
public void LoadInEditor()
{
Awake();
Start();
HandleEvent(null);
}
public void UnloadInEditor()
{
OnDestroy();
}
- In
AkInitializer.cs
make these methods public:Awake()
OnDestroy()
OnEnable()
LateUpdate()
OnDisable()
- In
AkTerminator.cs
make these methods publicAwake()
OnApplicationQuit()
OnDestroy()
- Make sure to wrap all
DontDestroyOnLoad()
methods inif (Application.isPlaying)
inAkInitializer.cs
andAkTerminator.cs
- Get Wwise events IDs using code from
GetWwiseEventIDs.cs
(see above) and then just send one of the IDs toPlay()
method inWwiseEditorPreview.cs
(note that in this case it usesstring
for id, but you can simply change that by removing type cast)