// Don't need a prereq on the pawn if the movement component already sets up a prereq. if (PawnMovement->bTickBeforeOwner || NewPawn->PrimaryActorTick.GetPrerequisites().Contains(FTickPrerequisite(PawnMovement, PawnMovement->PrimaryComponentTick))) { bNeedsPawnPrereq = false; } } if (bNeedsPawnPrereq) { NewPawn->PrimaryActorTick.AddPrerequisite(this, this->PrimaryActorTick); } } }
// Super may start up the tick function when we don't want to. UpdateTickRegistration();
// If the owner ticks, make sure we tick first AActor* Owner = GetOwner(); if (bTickBeforeOwner && bRegister && PrimaryComponentTick.bCanEverTick && Owner && Owner->CanEverTick()) { Owner->PrimaryActorTick.AddPrerequisite(this, PrimaryComponentTick); } }