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.

0 votes
Hello,

In my version of Wwise for Unity, the PostEvent method requires a uint as third argument, and not a AkCallBackType. How do I convert an AkCallBackType into a uint then? I understand I should use a bitmask, but it doesn't seem to work neither.

For instance, this : PostEvent(myEventName, myGameObject, AKCallbackType.AK_EnableGetSourcePlayPosition | AKCallbackType.AK_EndOfEvent);

triggers this error :  Argument `#3' cannot convert `AkCallbackType' expression to type `uint'

Am I missing something?

Thanks
in General Discussion by Julian M. (290 points)

1 Answer

0 votes
 
Best answer

Found it ! I simply had to cast my AKCallbackType objects as uint...

So this should work well : PostEvent(myEventName, myGameObject, (uint) AKCallbackType.AK_EnableGetSourcePlayPosition | (uint) AKCallbackType.AK_EndOfEvent);

by Julian M. (290 points)
...