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.

How do I use Wwise types in Unity?

0 votes

Hi,

I'm having real trouble using Wwise types in the Unity integration.

I have a script on a UI prefab that essentially contains this:

public class myClass : MonoBehaviour {

 

    public AK.Wwise.Event myEvent = null;

[...]

    public void someFunction()

    {

            Debug.Log("Play event: " + myEvent.ToString());

            myEvent.Post(gameObject);

    }

With this, the editor fields show up fine, and I am able to select the event which I would like to play from someFunction().

However, when I run it no event is posted. The output log just says "Play event: AK.Wwise.Event" from the debug command. And if I set a breakpoint to myEvent.Post(gameObject), then the value of myEvent is just set to {AK.Wwise.Event}

Am I doing something wrong in setting the events up?

 

 

Here is an image of the actual code and editor, for reference (names are less simplified than above):

asked May 10, 2018 in General Discussion by Jonathan P. (500 points)

Please sign-in or register to answer this question.

...