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.

Get Marker Label from AkMarkerCallbackInfo in Untity

0 votes
Hello,

I already tried around a bit, but i just cant get it to work.

this is my code and I have a wwise event with a marker. My goal is to put out the name of the marker in the callback function. How can I achieve that ?
    public void WwiseDialogue()
    {
        dialogue.Post(gameObject, (uint)AkCallbackType.AK_Marker, WwiseLastDialogueEnd);
    }
    public void WwiseLastDialogueEnd(object in_cookie, AkCallbackType in_type, object in_info)
    {
    }
asked Feb 2, 2020 in General Discussion by jonas k. (150 points)

1 Answer

+1 vote

Hey Jonas, 

So what you could do is typecast the in_info to AkMarkerCallbackInfo. Try this: 

public void WwiseDialogue() {
    dialogue.Post(gameObject, (uint)AkCallbackType.AK_Marker, WwiseLastDialogueEnd);
}

public void WwiseLastDialogueEnd(object in_cookie, AkCallbackType in_type, object in_info) {
    if (in_type == AkCallbackType.AK_Marker) {
        AkMarkerCallbackInfo info = (AkMarkerCallbackInfo)in_info;
        print(info.strLabel); // This prints the marker name          
    }
}

Let us know if that's what you need.

answered Feb 3, 2020 by Mads Maretty S. (Audiokinetic) (38,720 points)
Yes exactly, thanks a lot :)
...