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

Communication problem between Wwise RTPC and Unity

+1 투표

Hello,

I'm having trouble getting Unity to respond to either an event or RTPC. The RTPC is used to switch between layers of interactive music tracks that are housed in the same segment,playlist, switch container. It works fine within Wwise's soundcaster window but i cant get it to work within Unity.

The code I've written is simple. Although I'm relatively new to it, so there may be an error there.


        if(Input.GetKeyDown(KeyCode.J))
        AkSoundEngine.SetRTPCValue ("Time_Reverse"29GameObject.Find ("WwiseGlobal"));

        else
            AkSoundEngine.SetRTPCValue ("Time_Reverse"5GameObject.Find ("WwiseGlobal"));

       if (Input.GetKeyDown (KeyCode.J))
            print ("J is pressed");

The game run's without any compiler errors and the Debug log prints "J is pressed".  The track's music plays however i cannot get it to switch to the second layer.

I'm not sure where i've made a mistake and hours of googling haven't got anywhere.

 

Thanks in Advance
 

문의 2016 10월 27 General Discussion ian S. (110 포인트) 로 부터

1 답변

0 투표

AS far as i can say, the Ak::SoundEngine.SetRTPC() function takes only two arguments, (no gameObject as an Rtpc is not attached to a specific sound/event/whatever

Don't know if it's your problem. 

Another things that could be the problem (or not) : declare the value you send clearly as a float. I means, write 29f instead of 29

답변 2016 11월 15 olivier h. (290 포인트) 로 부터
...