UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FTickableGameObject Class Reference

#include <Tickable.h>

+ Inheritance diagram for FTickableGameObject:

Public Member Functions

 UE_NONCOPYABLE (FTickableGameObject)
 
ENGINE_API FTickableGameObject (ETickableTickType StartingTickType=ETickableTickType::NewObject)
 
virtual ENGINE_API ~FTickableGameObject ()
 
virtual bool IsTickableWhenPaused () const
 
virtual bool IsTickableInEditor () const
 
virtual UWorldGetTickableGameObjectWorld () const
 
ENGINE_API void SetTickableTickType (ETickableTickType NewTickType)
 
- Public Member Functions inherited from FTickableObjectBase
virtual void Tick (float DeltaTime)=0
 
virtual ETickableTickType GetTickableTickType () const
 
virtual bool IsTickable () const
 
virtual bool IsAllowedToTick () const
 
virtual TStatId GetStatId () const =0
 

Static Public Member Functions

static ENGINE_API void TickObjects (UWorld *World, ELevelTick LevelTickType, bool bIsPaused, float DeltaSeconds)
 

Additional Inherited Members

- Static Protected Member Functions inherited from FTickableObjectBase
static ENGINE_API void SimpleTickObjects (FTickableStatics &Statics, TFunctionRef< void(FTickableObjectBase *)> TickFunc)
 

Detailed Description

This class provides common registration for gamethread tickable objects. It is an abstract base class requiring you to implement the Tick() and GetStatId() methods. Can optionally also be ticked in the Editor, allowing for an object that both ticks during edit time and at runtime.

Constructor & Destructor Documentation

◆ FTickableGameObject()

FTickableGameObject::FTickableGameObject ( ETickableTickType  StartingTickType = ETickableTickType::NewObject)

Registers this instance with the static array of tickable objects, if it can ever tick. By default this function can only be called on the game thread, to make sure it doesn't call functions before initialization is complete. With the default NewObject tick type, it will call GetTickableTickType at the start of the next tick to determine the desired type. If this is something like a UObject that could be created on a different thread (like for async loading), construct with a Never tick type and enable tick later.

Parameters
StartingTickTypeThe initial ticking state of this object, override it to start disabled or skip the call to GetTickableTickType

◆ ~FTickableGameObject()

FTickableGameObject::~FTickableGameObject ( )
virtual

Removes this instance from the static array of tickable objects.

Member Function Documentation

◆ GetTickableGameObjectWorld()

virtual UWorld * FTickableGameObject::GetTickableGameObjectWorld ( ) const
inlinevirtual

Used to determine the specific world this object is associated with. If this returns a valid world it will tick during that world's level tick. If this returns null, it will tick during the general engine tick after all world ticks.

Returns
the world this object is associated with, or nullptr

Reimplemented in UAISubsystem, UInputDeviceSubsystem, and UTickableWorldSubsystem.

◆ IsTickableInEditor()

virtual bool FTickableGameObject::IsTickableInEditor ( ) const
inlinevirtual

Used to determine whether the object should be ticked in the editor when there is no gameplay world. Objects will still be ticked in Play in Editor if they are associated with a PIE world.

Returns
true if this tickable object should always be ticked in the editor, even if there is no gameplay world

Reimplemented in FCrowdTickHelper, FStreamableDelegateDelayHelper, FNavTestTickHelper, UInputDeviceSubsystem, FPhysicsThreadSyncCaller, FSkinWeightProfileManager, UWorldPartitionSubsystem, UDataflowSimulationManager, ULandscapeSubsystem, and FSlateRHIResourceManager.

◆ IsTickableWhenPaused()

virtual bool FTickableGameObject::IsTickableWhenPaused ( ) const
inlinevirtual

Used to determine if an object should be ticked when the game is paused. Defaults to false, as that mimics old behavior.

Returns
true if it should be ticked when paused, false otherwise

Reimplemented in FCrowdTickHelper, UQuartzSubsystem, FStreamableDelegateDelayHelper, FSkinWeightProfileManager, FHttpNetworkReplayStreamingFactory, FInMemoryNetworkReplayStreamer, FLocalFileNetworkReplayStreamingFactory, FNullNetworkReplayStreamer, and FSlateRHIResourceManager.

◆ SetTickableTickType()

void FTickableGameObject::SetTickableTickType ( ETickableTickType  NewTickType)

Call to modify the tickable type of this instance. This can be used to enable or disable tick even if GetTickableTickType has already been called. If this is a UObject that could be destroyed on a different thread, call this with Never during BeginDestroy (or earlier).

Parameters
NewTickTypeThe new tick type of this instance

◆ TickObjects()

PRAGMA_DISABLE_DEPRECATION_WARNINGS void FTickableGameObject::TickObjects ( UWorld World,
ELevelTick  LevelTickType,
bool  bIsPaused,
float  DeltaSeconds 
)
static

Tick all FTickableGameObject instances that match the parameters.

Parameters
WorldSpecific world that is ticking, must match GetTickableGameObjectWorld to tick.
LevelTickTypeThe type of tick where LEVELTICK_All is treated like a gameplay tick.
bIsPausedTrue if the gameplay world is paused, if this is false IsTickableWhenPaused must return true to tick.
DeltaTimeGame time passed since the last call.

◆ UE_NONCOPYABLE()

FTickableGameObject::UE_NONCOPYABLE ( FTickableGameObject  )

Tickable objects cannot be copied safely due to the auto registration


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