Connection to custom unity server using mirror. Amazon GameLift. Dedicated-server, gamelift, mirror. 1: 22: April 23, 2021 Child Sort Order Changes In Slices. Which configuration of the Wwise-Unity Plug-in are you running? Only Debug and Profile have the communication code enabled. Open the Task Manager, kill any process named 'adb.exe'. This is the Android driver and it locks TCP ports. This is true even if you don't develop on Android or have any Android device connected. The Wwise-Unity integration is a thin layer of C# calling the native Wwise API. It comes pre-built for all platforms. In most cases, it is unnecessary to rebuild the Integration plug-in. However, if you have the source code, you may want to customize it to integrate custom changes to the native sound engine or to modify the C code that.
Wwise RTPCs are useful for making changes to our Wwise sound objects by using game variables. In this tutorial we will create a RTPC in Wwise to control the pitch setting of a sound. We will then set the RTPC to an arbitrary value at runtime in Unity.
Table of Contents
Creating a RTPC in the Wwise Authoring Tool
Wwise Spatial Audio
To create a RTPC in Wwise, select a sound object in the Actor-Mixer-Hierarchy, right click on the pitch setting and select Add RTPC->Game Parameters->New:
Give the Game Parameter a new name and you will presented with the RTPC view of the sound object:
By default Game Parameters have a value range between 0 and 100 with a default value of 50. If we want to change the range setting we can switch to the Game Syncs tab and select the appropriate Game Parameter. The Game Parameter Property Editor will show up:
Alternatively, we can also directly double click on the Game Parameter in the RTPC tab of the Sound Property Editor:
I will select a range between -12 and 12 with a default value of 0. Furthermore, I set the min value of the Game Parameter to -1200 and the max value to 1200. 1200 cents are the equivalent of an octave in Wwise:
Controlling a RTPC in Unity by using AkSoundEngine.SetRTPCValue
The simplest way to control a RTPC value is to use the
SetRTPCValue
method of the AkSoundEngine namespace. In general the code looks like this:The first parameter of the SetRTPCValue method is a string referring to the name of the RTPC. The second parameter is a float variable. Set this to the value you want to set the RTPC to. The third parameter is the GameObject we want our RTPC to act on.
Audiokinetic
If you want to set the RTPC value on a global scope, replace the GameObject argument with
AK_INVALID_GAME_OBJECT
.Controlling a RTPC in Unity by using the AK.Wwise.RTPC Type
To declare a Wwise RTPC Type add following code line at the start of your class:
We can select the appropriate RTPC value in Unity’s inspector:
After that we can set the RTPC value my calling the
SetValue
method of the Wwise.RTPC type:If you want the RTPC to have effect on a global scope, call
SetGlobalValue
instead:To test the RTPC created above declare a float value with a range attribute between -12 and 12 at the start of the class:
A slider will show up in Unity’s inspector:
Start the scene, make sure to have an Event playing a sound affected by the RTPC on the GameObject and move the pitch parameter value slider, you will hear the changes in pitch taking place. That’s it! You learned how to control RTPCs in Unity. Check out the tutorials about setting Wwise Switches in Unity or setting Wwise States in Unity.
Do you need individual in-depth support regarding the Wwise-Unity integration?
Book a a one-hour session with me and tell me about your problem. Including code support. I would be happy to help you! ?
Book a a one-hour session with me and tell me about your problem. Including code support. I would be happy to help you! ?