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.

+3 votes
I am trying to call PostAkEventByNameWithDelegate, but the signature for the function is not working for me.

Can someone help?

    MyAkComp->PostAkEventByNameWithDelegate( EventName, AkCallbackType::AK_EndOfEvent, &UMyClass::OnDialogEventComplete );

The signature for my OnDialogEventComplete function is:

    UFUNCTION()
        void OnDialogEventComplete( EAkCallbackType CallbackType, class UAkCallbackInfo* CallbackInfo );
in General Discussion by Ben H. (250 points)

1 Answer

+1 vote
I would really appreciate input on this one, ideally an example of how this is used.

In my code, I have the delegate as a member of my custom sound component, which I pass by reference to the PostEvent function with the callback mask of 0 (which should be EndOfEvent?). I bind a local function using BindDynamic macro on BeginPlay, but my callback never gets triggered.
by Adrian J. (210 points)
One year later, but just incase other people encounter this issue:

Do not use EAkCallbackType from AkGameplayTypes.h where EndOfEvent = 0 as the Callback mask.

Use AkCallbackType from AkCallback.h where Ak_EndOfEvent = 0x0001 instead.

if you use EAkCallbackType::EndOfEvent
FAkComponentCallbackManager::AkComponentCallback will fail because the pPackage->uUserFlags are 0 instead of 1

Cheers
This sir, you just ended my 8 hour long struggle in header files.
...