I have made a new APaperFlipbookActor class. I then give it a flipbook in code, the flipbook has a frame rate of 0, as I want to manually move and control it to generate an effect.
The editor make a file without a constructor even. Just GENERATE_BODY()
So I add a Constructor, and a Tick override. These are overridden, there is no warning or error.
Tick never gets called. I google, read up and find you need to enable it with PrimaryActorTick.bCanEverTick = true; in the constructor. Still doesn’t work, I throw in PrimaryActorTick.bStartWithTickEnabled = true; it still doesn’t work.
After searching, looking at the PrimaryActorTick class and hunting I slow add more and more off this to the BeginPlay ( which does get called)
“NOT registered” is displayed when I run, but “NOT Registered STILL” does not. So the register completes. But still I don’t have a tick. If I set the FPS on the Flipbook to be something other than 0, say 5, it updates and animates as expected so there has to be a tick somewhere.
What else do I have to do?
Why do I have to do this in the first place?
If I remove all the tick set up code and just have the normal PrimaryActorTick.bCanEverTick = true; in the constructor and convert the object to an AActor then Tick gets called as expected. So this is an APaperFlipbookActor specific issue.
To those that come after…
I found the docs for it, PAPER2APaperFlipbookActor | Unreal Engine Documentation for some reason its a PAPER2A version while the class name is not and just APaperFlipbookActor.
To which unlike APaperCharacter the constructor ( which is not in the .h file ) is APaperFlipbookActor(const FObjectInitializer& ObjectInitializer); and as such while calling a normal () constructor will get you a flipbook object that works and plays. However you won’t be able to get the tick working. You need to add the const FObjectInitializer& ObjectInitializer to your constructor and call the super with it, for example