RealDocs

UActorComponent::RegisterAllComponentTickFunctions

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

Description

Calls the virtual RegisterComponentTickFunctions chain to register or unregister all tick functions for this component. Do not override this function; override RegisterComponentTickFunctions instead.

Caveats & Gotchas

  • • This function is intentionally non-virtual — the header comment explicitly states not to override it. Override RegisterComponentTickFunctions (the protected virtual) to add custom tick function registration.
  • • Called automatically during component registration and unregistration; you rarely need to call it manually unless implementing a custom component registration flow.

Signature

ENGINE_API void RegisterAllComponentTickFunctions(bool bRegister)

Parameters

Name Type Description Default
bRegister bool True to register tick functions with the tick manager, false to unregister them. —

Return Type

void

Example

Overriding RegisterComponentTickFunctions to add a secondary tick C++
void UMyComponent::RegisterComponentTickFunctions(bool bRegister)
{
    Super::RegisterComponentTickFunctions(bRegister);
    if (bRegister)
    {
        if (SetupActorComponentTickFunction(&SecondaryTick))
        {
            SecondaryTick.Target = this;
        }
    }
    else
    {
        if (SecondaryTick.IsTickFunctionRegistered())
        {
            SecondaryTick.UnRegisterTickFunction();
        }
    }
}

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.