UActorComponent::RemoveTickPrerequisiteActor
#include "Components/ActorComponent.h"
Access: public
Specifiers: ENGINE_APIvirtualUFUNCTIONBlueprintCallable
Description
Removes a previously added tick dependency on the specified actor, allowing this component to tick without waiting for that actor.
Caveats & Gotchas
- • Passing an actor that was never added as a prerequisite is a no-op — no error or warning is produced.
- • Call this before the prerequisite actor is destroyed if you want clean teardown; failing to do so leaves stale references in the tick dependency list.
Signature
ENGINE_API virtual void RemoveTickPrerequisiteActor(AActor* PrerequisiteActor); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PrerequisiteActor | AActor* | The actor whose tick dependency should be removed. | — |
Return Type
void Example
Clean up tick dependency when a target is cleared C++
void UFollowerComponent::ClearTarget()
{
if (TargetActor)
{
RemoveTickPrerequisiteActor(TargetActor);
TargetActor = nullptr;
}
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?