UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FTickFunction Struct Reference

#include <EngineBaseTypes.h>

+ Inheritance diagram for FTickFunction:

Public Member Functions

 UPROPERTY (EditDefaultsOnly, Category="Tick", meta=(DisplayName="Tick Interval (secs)")) float TickInterval
 
ENGINE_API FTickFunction ()
 
virtual ENGINE_API ~FTickFunction ()
 
ENGINE_API void RegisterTickFunction (class ULevel *Level)
 
ENGINE_API void UnRegisterTickFunction ()
 
bool IsTickFunctionRegistered () const
 
ENGINE_API void SetTickFunctionEnable (bool bInEnabled)
 
bool IsTickFunctionEnabled () const
 
ENGINE_API void UpdateTickIntervalAndCoolDown (float NewTickInterval)
 
ENGINE_API bool IsCompletionHandleValid () const
 
ENGINE_API FGraphEventRef GetCompletionHandle () const
 
virtual ENGINE_API bool CanDispatchManually () const
 
virtual ENGINE_API bool DispatchManually ()
 
TEnumAsByte< enum ETickingGroupGetActualTickGroup () const
 
TEnumAsByte< enum ETickingGroupGetActualEndTickGroup () const
 
ENGINE_API void AddPrerequisite (UObject *TargetObject, struct FTickFunction &TargetTickFunction)
 
ENGINE_API void RemovePrerequisite (UObject *TargetObject, struct FTickFunction &TargetTickFunction)
 
ENGINE_API void SetPriorityIncludingPrerequisites (bool bInHighPriority)
 
TArray< struct FTickPrerequisite > & GetPrerequisites ()
 
const TArray< struct FTickPrerequisite > & GetPrerequisites () const
 
float GetLastTickGameTime () const
 
ENGINE_API void ExecuteNestedTick (float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const FGraphEventRef &MyCompletionGraphEvent)
 
ENGINE_API float CalculateDeltaTime (float DeltaTime, const class UWorld *TickingWorld)
 
ENGINE_API void LogTickFunction (ENamedThreads::Type CurrentThread, bool bLogPrerequisites, int32 Indent=0)
 
ENGINE_API void ShowPrerequistes (int32 Indent=1)
 
ENGINE_API void ClearTaskInformation ()
 
virtual void ExecuteTick (float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const FGraphEventRef &MyCompletionGraphEvent) PURE_VIRTUAL(
 
virtual void virtual FString DiagnosticMessage () PURE_VIRTUAL(
 
virtual void virtual FString return TEXT ("DiagnosticMessage() not implemented")
 
virtual FName DiagnosticContext (bool bDetailed)
 
virtual void ForEachNestedTick (TFunctionRef< void(FTickFunction &)> InFunc) const
 
FTickFunctionoperator= (const FTickFunction &)=delete
 

Public Attributes

TEnumAsByte< enum ETickingGroupTickGroup
 
TEnumAsByte< enum ETickingGroupEndTickGroup
 
uint8 bTickEvenWhenPaused:1
 
uint8 bCanEverTick:1
 
uint8 bStartWithTickEnabled:1
 
uint8 bAllowTickOnDedicatedServer:1
 
uint8 bAllowTickBatching:1
 
uint8 bHighPriority:1
 
uint8 bRunOnAnyThread:1
 
uint8 bRunTransactionally:1
 
uint8 bDispatchManually: 1
 

Friends

class FTickTaskSequencer
 
class FTickTaskManager
 
class FTickTaskLevel
 

Detailed Description

Abstract Base class for all tick functions.

Constructor & Destructor Documentation

◆ FTickFunction()

FTickFunction::FTickFunction ( )

Default constructor, intitalizes to reasonable defaults

◆ ~FTickFunction()

FTickFunction::~FTickFunction ( )
virtual

Destructor, unregisters the tick function

Member Function Documentation

◆ AddPrerequisite()

void FTickFunction::AddPrerequisite ( UObject TargetObject,
struct FTickFunction TargetTickFunction 
)

Adds a tick function to the list of prerequisites...in other words, adds the requirement that TargetTickFunction is called before this tick function is

Parameters
TargetObject- UObject containing this tick function. Only used to verify that the other pointer is still usable
TargetTickFunction- Actual tick function to use as a prerequisite

◆ CalculateDeltaTime()

float FTickFunction::CalculateDeltaTime ( float  DeltaTime,
const class UWorld TickingWorld 
)

Returns the delta time to use when ticking this function given the delta time and world. This also updates internal tracking data

◆ CanDispatchManually()

bool FTickFunction::CanDispatchManually ( ) const
virtual

Returns true if bDispatchManually is set and this has a task that can be triggered right now.

◆ ClearTaskInformation()

void FTickFunction::ClearTaskInformation ( )

Clear any current task information such as the completion handle, called after execution

◆ DiagnosticContext()

◆ DiagnosticMessage()

◆ DispatchManually()

bool FTickFunction::DispatchManually ( )
virtual

If bDispatchManually is set, attempt to start the task based on some event during a frame. It will return true if it worked, which may have executed immediately or may be waiting for a prerequisite.

◆ ExecuteNestedTick()

void FTickFunction::ExecuteNestedTick ( float  DeltaTime,
ELevelTick  TickType,
ENamedThreads::Type  CurrentThread,
const FGraphEventRef MyCompletionGraphEvent 
)

Correctly call ExecuteTick on a nested function, and will set the completion event properly for the duration of the tick function

Parameters
DeltaTime- frame time to advance, in seconds
TickType- kind of tick for this frame
CurrentThread- thread we are executing on, useful to pass along as new tasks are created
MyCompletionGraphEvent- completion event for this task. Useful for holding the completetion of this task until certain child tasks are complete.

◆ ExecuteTick()

virtual void FTickFunction::ExecuteTick ( float  DeltaTime,
ELevelTick  TickType,
ENamedThreads::Type  CurrentThread,
const FGraphEventRef MyCompletionGraphEvent 
)
virtual

Abstract function actually execute the tick. Batched tick managers should use ExecuteNestedTick

Parameters
DeltaTime- frame time to advance, in seconds
TickType- kind of tick for this frame
CurrentThread- thread we are executing on, useful to pass along as new tasks are created
MyCompletionGraphEvent- completion event for this task. Useful for holding the completetion of this task until certain child tasks are complete.

Reimplemented in FActorTickFunction, FActorComponentTickFunction, FParticleSystemWorldManagerTickFunction, FTestTickFunction, FSkinWeightProfileManagerTickFunction, UE::Tick::FWorkQueueTickFunction, FConstraintTickFunction, FMassProcessingPhase, FSkeletalMeshComponentEndPhysicsTickFunction, FSkeletalMeshComponentClothTickFunction, FStartPhysicsTickFunction, FEndPhysicsTickFunction, FCharacterMovementComponentPostPhysicsTickFunction, and FCharacterMovementComponentPrePhysicsTickFunction.

◆ ForEachNestedTick()

virtual void FTickFunction::ForEachNestedTick ( TFunctionRef< void(FTickFunction &)>  InFunc) const
inlinevirtual

To properly expose nested/batched tick functions to the logging and debugging systems of the tick manager, override this to execute InFunc for every nested tick function that would be executed as part of this tick.

◆ GetActualEndTickGroup()

TEnumAsByte< enum ETickingGroup > FTickFunction::GetActualEndTickGroup ( ) const
inline

Gets the action tick group that this function will be required to end in. Only valid after StartFrame has been called through the end of the frame.

◆ GetActualTickGroup()

TEnumAsByte< enum ETickingGroup > FTickFunction::GetActualTickGroup ( ) const
inline

Gets the action tick group that this function will be elligible to start in. Only valid after StartFrame has been called through the end of the frame.

◆ GetCompletionHandle()

FGraphEventRef FTickFunction::GetCompletionHandle ( ) const

Gets the current completion handle of this tick function, so it can be delayed until a later point when some additional tasks have been completed. Only valid after StartFrame has been called and then only until the TickFunction finishes execution. This returns a reference so IsCompletionHandleValid must be called first.

◆ GetLastTickGameTime()

float FTickFunction::GetLastTickGameTime ( ) const
inline

For actively registered tick functions with an interval, return the last time it ticked. For unregistered or non-interval functions it will return -1;

◆ GetPrerequisites() [1/2]

TArray< struct FTickPrerequisite > & FTickFunction::GetPrerequisites ( )
inline
Returns
a reference to prerequisites for this tick function.

◆ GetPrerequisites() [2/2]

const TArray< struct FTickPrerequisite > & FTickFunction::GetPrerequisites ( ) const
inline
Returns
a reference to prerequisites for this tick function (const).

◆ IsCompletionHandleValid()

bool FTickFunction::IsCompletionHandleValid ( ) const

Returns true if it is valid to access this tick function's completion handle

◆ IsTickFunctionEnabled()

bool FTickFunction::IsTickFunctionEnabled ( ) const
inline

Returns whether the tick function is currently enabled

◆ IsTickFunctionRegistered()

bool FTickFunction::IsTickFunctionRegistered ( ) const
inline

See if the tick function is currently registered

◆ LogTickFunction()

void FTickFunction::LogTickFunction ( ENamedThreads::Type  CurrentThread,
bool  bLogPrerequisites,
int32  Indent = 0 
)

Logs function info based on flags

◆ operator=()

FTickFunction & FTickFunction::operator= ( const FTickFunction )
delete

◆ RegisterTickFunction()

void FTickFunction::RegisterTickFunction ( class ULevel Level)

Adds the tick function to the primary list of tick functions.

Parameters
Level- level to place this tick function in

◆ RemovePrerequisite()

void FTickFunction::RemovePrerequisite ( UObject TargetObject,
struct FTickFunction TargetTickFunction 
)

Removes a prerequisite that was previously added.

Parameters
TargetObject- UObject containing this tick function. Only used to verify that the other pointer is still usable
TargetTickFunction- Actual tick function to use as a prerequisite

◆ SetPriorityIncludingPrerequisites()

void FTickFunction::SetPriorityIncludingPrerequisites ( bool  bInHighPriority)

Sets this function to hipri and all prerequisites recursively

Parameters
bInHighPriority- priority to set

◆ SetTickFunctionEnable()

void FTickFunction::SetTickFunctionEnable ( bool  bInEnabled)

Enables or disables this tick function.

◆ ShowPrerequistes()

void FTickFunction::ShowPrerequistes ( int32  Indent = 1)

Logs the prerequisites

◆ TEXT()

virtual void virtual FString return FTickFunction::TEXT ( "DiagnosticMessage() not implemented"  )

◆ UnRegisterTickFunction()

void FTickFunction::UnRegisterTickFunction ( )

Removes the tick function from the primary list of tick functions.

◆ UpdateTickIntervalAndCoolDown()

void FTickFunction::UpdateTickIntervalAndCoolDown ( float  NewTickInterval)

Update tick interval in the system and overwrite the current cooldown if any.

◆ UPROPERTY()

FTickFunction::UPROPERTY ( EditDefaultsOnly  ,
Category  = "Tick",
meta  = (DisplayName="Tick Interval (secs)") 
)

The frequency in seconds at which this tick function will be executed. If less than or equal to 0 then it will tick every frame

Friends And Related Symbol Documentation

◆ FTickTaskLevel

friend class FTickTaskLevel
friend

◆ FTickTaskManager

friend class FTickTaskManager
friend

◆ FTickTaskSequencer

friend class FTickTaskSequencer
friend

Member Data Documentation

◆ bAllowTickBatching

uint8 FTickFunction::bAllowTickBatching

True if we allow this tick to be combined with other ticks for improved performance

◆ bAllowTickOnDedicatedServer

uint8 FTickFunction::bAllowTickOnDedicatedServer

If we allow this tick to run on a dedicated server

◆ bCanEverTick

uint8 FTickFunction::bCanEverTick

If false, this tick function will never be registered and will never tick. Only settable in defaults.

◆ bDispatchManually

uint8 FTickFunction::bDispatchManually

True if this is an event that will not execute until it has been manually dispatched (and prerequisites complete) instead of being dispatched at start of the tick group

◆ bHighPriority

uint8 FTickFunction::bHighPriority

Run this tick first within the tick group, presumably to start async tasks that must be completed with this tick group, hiding the latency.

◆ bRunOnAnyThread

uint8 FTickFunction::bRunOnAnyThread

If false, this tick will run on the game thread, otherwise it will run on any thread in parallel with the game thread and in parallel with other "async ticks"

◆ bRunTransactionally

uint8 FTickFunction::bRunTransactionally

(experimental) if true, the tick function will be run transactionally

◆ bStartWithTickEnabled

uint8 FTickFunction::bStartWithTickEnabled

If true, this tick function will start enabled, but can be disabled later on.

◆ bTickEvenWhenPaused

uint8 FTickFunction::bTickEvenWhenPaused

Bool indicating that this function should execute even if the game is paused. Pause ticks are very limited in capabilities.

◆ EndTickGroup

TEnumAsByte<enum ETickingGroup> FTickFunction::EndTickGroup

Defines the tick group that this tick function must finish in. These groups determine the relative order of when objects tick during a frame update.

See also
ETickingGroup

◆ TickGroup

TEnumAsByte<enum ETickingGroup> FTickFunction::TickGroup

Defines the minimum tick group for this tick function. These groups determine the relative order of when objects tick during a frame update. Given prerequisites, the tick may be delayed.

See also
ETickingGroup
FTickFunction::AddPrerequisite()

The documentation for this struct was generated from the following files: