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 );
General Discussion Ben H. (250 포인트) 로 부터

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.
...