menu
 

Audiokinetic의 커뮤니티 Q&A는 사용자가 Wwise와 Strata 커뮤니티 내에서 서로 질문과 답변을 하는 포럼입니다. Audiokinetic의 기술 지원팀에게 문의하고 싶으신 경우 지원 티켓 페이지를 사용해주세요.

0 투표
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.
General Discussion Jonas N. (100 포인트) 로 부터

Please sign-in or register to answer this question.

...