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.

Communication problem between Wwise RTPC and Unity

+1 vote

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
 

asked Oct 27, 2016 in General Discussion by ian S. (110 points)

1 Answer

0 votes

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

answered Nov 15, 2016 by olivier h. (290 points)
...