Download

OnFinishedPlaying not work in a class create by APaperCharacter.

I create a Character from APaperCharacter.And want trigger callback when the Sprite finishs animation.

Check the source code in PaperCharacter.h found **class UPaperFlipbookComponent Sprite. ***

And in **PaperFlipbookComponent.h *found virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction ThisTickFunction) override;

So I run ***GetSprite()->TickComponent(DeltaTime, ELevelTick::LEVELTICK_All, NULL); ***in ***Tick(). ***I add breakpoints in ***TickComponent ***but never trigger.

And I run ***GetSprite()->OnFinishedPlaying.AddDynamic(this, &ASoldierCharacter::FinishedPlaying); in BeginPlay(). ***Not work either.

Any ideas, or i use it wrong. Please help.