So I’m trying to run some code on an actor every tick. The class extends from AActor, and I’ve included this line in the header:
virtual void Tick(float DeltaSeconds) override;
In the constructor of the .cpp file, I have these lines:
PrimaryActorTick.bCanEverTick = true;
PrimaryActorTick.bStartWithTickEnabled = true;
And I also have this function defined:
void ANewActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
UE_LOG(LogExec, Warning, TEXT("Ticking"));
}
However, the Tick function is never called, and the text never printed. Have I forgotten anything?