RealDocs

UActorComponent::RemoveTickPrerequisiteComponent

function Engine Blueprint Since 4.0
#include "Components/ActorComponent.h"
Access: public Specifiers: ENGINE_APIvirtualUFUNCTIONBlueprintCallable

Description

Removes a previously added tick dependency on the specified component, allowing this component to tick without waiting for that component.

Caveats & Gotchas

  • Passing a component that was never added as a prerequisite is silently ignored.
  • Should be called before the prerequisite component is unregistered or destroyed to prevent dangling tick dependency pointers.

Signature

ENGINE_API virtual void RemoveTickPrerequisiteComponent(UActorComponent* PrerequisiteComponent);

Parameters

Name Type Description Default
PrerequisiteComponent UActorComponent* The component whose tick dependency should be removed.

Return Type

void

Example

Remove component tick dependency on cleanup C++
void UIKComponent::EndPlay(const EEndPlayReason::Type Reason)
{
	if (SkeletonComponent)
	{
		RemoveTickPrerequisiteComponent(SkeletonComponent);
	}
	Super::EndPlay(Reason);
}

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.