RealDocs

AActor::AddTickPrerequisiteActor

function Engine Blueprint Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: virtualUFUNCTIONBlueprintCallable

Description

Forces this actor's tick to run after the specified actor's tick has completed. Use this to establish data-dependency ordering between actors within the same tick group.

Caveats & Gotchas

  • This only affects the actor's own primary tick function — components owned by this actor are not automatically ordered. Call AddTickPrerequisiteActor/Component on each component separately if needed.
  • Prerequisites only impose ordering within the same tick group. If the prerequisite actor is in a later tick group (e.g., PostPhysics) and this actor is in PrePhysics, the prerequisite is ignored and no ordering is enforced.
  • Adding circular prerequisites (A depends on B, B depends on A) will cause a deadlock in the tick system and stall the frame.

Signature

virtual void AddTickPrerequisiteActor(AActor* PrerequisiteActor)

Parameters

Name Type Description Default
PrerequisiteActor AActor* The actor whose tick must complete before this actor ticks.

Return Type

void

Example

Ensure turret ticks after its base platform C++
void ATurret::BeginPlay()
{
    Super::BeginPlay();
    if (BasePlatform)
    {
        AddTickPrerequisiteActor(BasePlatform);
    }
}

Tags

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.