menu
 

AudiokineticのコミュニティQ&AはWwiseやStrataのコミュニティ内でユーザ同士が質問・回答をし合うことができるフォーラムです。Audiokineticテクニカルサポートチームからの回答をご希望の場合は、必ず サポートチケットページ をご利用ください。

+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
 

ian S. (110 ポイント) General Discussion

回答 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

olivier h. (290 ポイント)
...