Navigation
API > API/Runtime > API/Runtime/Engine
Warnings * Most of these functions are not threadsafe. The tick manager stores raw pointers to these structs and accesses them on the game thread, so registered functions cannot be safely destroyed during a tick frame.
Abstract base class for all tick functions. Registered tick functions are executed by the functions in FTickTaskManagerInterface during the engine tick frame.
Most of these functions are not threadsafe. The tick manager stores raw pointers to these structs and accesses them on the game thread, so registered functions cannot be safely destroyed during a tick frame.
| Name | FTickFunction |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/EngineBaseTypes.h |
| Include Path | #include "Engine/EngineBaseTypes.h" |
Syntax
USTRUCT ()
struct FTickFunction
Derived Classes
FTickFunction derived class hierarchy
- FActiveSyncPoint
- FActorComponentTickFunction
- FActorTickFunction
- FAttributeBasedRootMotionComponentPrePhysicsTickFunction
- FChaosClothComponentEndTickFunction
- FCharacterMovementComponentPostPhysicsTickFunction
- FCharacterMovementComponentPrePhysicsTickFunction
- FConstraintTickFunction
- FDeformableEndTickFunction
- FEndPhysicsTickFunction
- FInteractionIsland::FClosingTickFunction
- FInteractionIsland::FPostTickFunction
- FInteractionIsland::FPreTickFunction
- FLevelEditorSequencerUpdateGizmoTickFunction
- FMassProcessingPhase
- FMoverDynamicBasedMovementTickFunction
- FMoverStandaloneApplyStateTickFunction
- FMoverStandaloneProduceInputTickFunction
- FMoverStandaloneSimulateMovementTickFunction
- FNiagaraWorldManagerTickFunction
- FParticleSystemWorldManagerTickFunction
- FSkeletalMeshComponentClothEndTickFunction
- FSkeletalMeshComponentClothTickFunction
- FSkeletalMeshComponentEndPhysicsTickFunction
- FSkinWeightProfileManagerTickFunction
- FStartPhysicsTickFunction
- FTickAnimationSharingFunction
- FWorkQueueTickFunction
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTickFunction() |
Default constructor, initializes to disabled. | Engine/EngineBaseTypes.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FTickFunction() |
Destructor, unregisters the tick function if it is still registered. | Engine/EngineBaseTypes.h |
Structs
| Name | Remarks |
|---|---|
| FInternalData | Internal data structure that contains members only required for a registered tick function. |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAllowTickBatching | uint8 | True if we allow this tick to be combined with other ticks for improved performance | Engine/EngineBaseTypes.h | |
| bAllowTickOnDedicatedServer | uint8 | If we allow this tick to run on a dedicated server | Engine/EngineBaseTypes.h |
|
| bCanEverTick | uint8 | If false, this tick function will never be registered and will never tick. | Engine/EngineBaseTypes.h | |
| bDispatchManually | uint8 | 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 | Engine/EngineBaseTypes.h | |
| bHighPriority | uint8 | Run this tick first within the tick group, presumably to start async tasks that must be completed with this tick group, hiding the latency. | Engine/EngineBaseTypes.h | |
| bRunOnAnyThread | uint8 | If false, this tick will only run on the game thread. | Engine/EngineBaseTypes.h | |
| bRunTransactionally | uint8 | (experimental) if true, the tick function will be run transactionally | Engine/EngineBaseTypes.h | |
| bStartWithTickEnabled | uint8 | If true, this tick function will start enabled, but can be disabled later on. | Engine/EngineBaseTypes.h |
|
| bTickEvenWhenPaused | uint8 | Bool indicating that this function should execute even if the gameplay is paused. | Engine/EngineBaseTypes.h |
|
| EndTickGroup | TEnumAsByte< enum ETickingGroup > | Defines the tick group that this tick function must finish within. | Engine/EngineBaseTypes.h |
|
| TickGroup | TEnumAsByte< enum ETickingGroup > | Defines the first tick group where this function can be executed. | Engine/EngineBaseTypes.h |
|
| TickInterval | float | The time in seconds between executions of this tick function. | Engine/EngineBaseTypes.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bWasDispatchedManually | uint8 | For bDispatchManually functions, if this is set and the task is valid the task has been fully triggered and will execute | Engine/EngineBaseTypes.h | |
| InternalData | TUniquePtr< FInternalData > | Lazily allocated struct that contains the necessary data for a tick function that is registered | Engine/EngineBaseTypes.h | |
| Prerequisites | TArray< struct FTickPrerequisite > | List of prerequisites for this tick function, modified by calling Add/RemovePrerequisite. | Engine/EngineBaseTypes.h | |
| TickState | ETickState | Internal tick state, set by tick manager every frame. | Engine/EngineBaseTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddPrerequisite
(
UObject* TargetObject, |
Adds a tick function to the list of prerequisites. | Engine/EngineBaseTypes.h | |
float CalculateDeltaTime
(
float DeltaTime, |
Returns the delta time to use for ExecuteTick using the global delta time and world. | Engine/EngineBaseTypes.h | |
void ClearTaskInformation () |
Clear any current task information such as the completion handle. | Engine/EngineBaseTypes.h | |
void ExecuteNestedTick
(
float DeltaTime, |
Correctly call ExecuteTick on a nested function. | Engine/EngineBaseTypes.h | |
TEnumAsByte< enum ETickingGroup > GetActualEndTickGroup () |
Returns the last tick group this function could complete within. | Engine/EngineBaseTypes.h | |
TEnumAsByte< enum ETickingGroup > GetActualTickGroup () |
Gets the actual tick group that this function will start executing in. | Engine/EngineBaseTypes.h | |
FGraphEventRef GetCompletionHandle () |
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. | Engine/EngineBaseTypes.h | |
double GetLastIntervalTickGameTime () |
For actively registered tick functions with an interval, return the last time it ticked. | Engine/EngineBaseTypes.h | |
double GetLastTickGameTime() |
Engine/EngineBaseTypes.h | ||
const TArray< struct FTickPrerequisite > & GetPrerequisites () |
Return a reference to the prerequisites list for this tick function (const). | Engine/EngineBaseTypes.h | |
TArray< struct FTickPrerequisite > & GetPrerequisites () |
Return a reference to the prerequisites list for this tick function. | Engine/EngineBaseTypes.h | |
bool IsCompletionHandleValid () |
Returns true if GetCompletionHandle will return a valid completion handle. | Engine/EngineBaseTypes.h | |
bool IsTickFunctionEnabled() |
Returns whether the tick function is currently enabled and is possible to execute. | Engine/EngineBaseTypes.h | |
bool IsTickFunctionRegistered () |
See if the tick function is currently registered to a level in the tick manager. | Engine/EngineBaseTypes.h | |
void LogTickFunction
(
ENamedThreads::Type CurrentThread, |
Logs the DiagnosticMessage and other function info. | Engine/EngineBaseTypes.h | |
void RegisterTickFunction
(
ULevel* Level |
Adds the tick function to the primary list of tick functions for a specific level. | Engine/EngineBaseTypes.h | |
void RemovePrerequisite
(
UObject* TargetObject, |
Removes a prerequisite that was previously added. This will not affect the current tick frame. | Engine/EngineBaseTypes.h | |
void SetPriorityIncludingPrerequisites
(
bool bInHighPriority |
Sets this function to normal or high priority, and also modifies all prerequisites recursively. | Engine/EngineBaseTypes.h | |
void SetTickFunctionEnable
(
bool bInEnabled |
Enables or disables this tick function. | Engine/EngineBaseTypes.h | |
void ShowPrerequistes
(
int32 Indent |
Logs the prerequisite info specifically. | Engine/EngineBaseTypes.h | |
void UnRegisterTickFunction () |
Removes the tick function from the list of tick functions to automatically execute. | Engine/EngineBaseTypes.h | |
void UpdateTickIntervalAndCoolDown
(
float NewTickInterval |
Update tick interval in the system and overwrite the current cooldown if any. | Engine/EngineBaseTypes.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanDispatchManually() |
Returns true if bDispatchManually is set and this has a task that can be triggered right now. | Engine/EngineBaseTypes.h | |
virtual FName DiagnosticContext
(
bool bDetailed |
Override this function to return an internal name used to group related tick functions. | Engine/EngineBaseTypes.h | |
virtual FString DiagnosticMessage() |
Override this abstract function to return a human readable string used for debug commands. | Engine/EngineBaseTypes.h | |
virtual bool DispatchManually () |
If bDispatchManually is set, attempt to start the task based on some event during a frame. | Engine/EngineBaseTypes.h | |
virtual void ExecuteTick
(
float DeltaTime, |
Override this abstract function to actually execute the tick. | Engine/EngineBaseTypes.h | |
virtual void ForEachNestedTick
(
TFunctionRef< void(FTickFunction&)> InFunc |
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. | Engine/EngineBaseTypes.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTickFunction & operator=
(
const FTickFunction& |
It is unsafe to copy FTickFunctions and any subclasses of FTickFunction should specify the type trait WithCopy = false. | Engine/EngineBaseTypes.h |