Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Help me understand GetState syntax in C#/Unity

+1 vote

Hi,

I'm futzing around with AkSoundEngine.GetState in Unity for interactive music.  MonoDevelop is showing me it takes the following parameters:

string in_pstrStateGroupName
uint out_rState

I tried AkSoundEngine.GetState("MyStateGroupName", "MyStateName"); and it's a big failure.  I'm not sure what to put as an int for the 2nd parameter...

anyone help?  Thanks!

asked Nov 13, 2015 in General Discussion by Adam C. (230 points)

1 Answer

0 votes

The right way is:

uint stateID;
AkSoundEngine.GetState("MyStateGroupName", out stateID);

Now I have another question: how do I get the state name using state ID?

answered May 12 by João B. (170 points)
...