menu
 

AudiokineticのコミュニティQ&AはWwiseやStrataのコミュニティ内でユーザ同士が質問・回答をし合うことができるフォーラムです。Audiokineticテクニカルサポートチームからの回答をご希望の場合は、必ず サポートチケットページ をご利用ください。

+3 支持
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 );
Ben H. (250 ポイント) General Discussion

回答 1

+1 支持
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.
Adrian J. (210 ポイント)
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.
...