![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#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 UWorld * | GetTickableGameObjectWorld () 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) |
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.
| 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.
| StartingTickType | The initial ticking state of this object, override it to start disabled or skip the call to GetTickableTickType |
|
virtual |
Removes this instance from the static array of tickable objects.
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.
Reimplemented in UAISubsystem, UInputDeviceSubsystem, and UTickableWorldSubsystem.
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.
Reimplemented in FCrowdTickHelper, FStreamableDelegateDelayHelper, FNavTestTickHelper, UInputDeviceSubsystem, FPhysicsThreadSyncCaller, FSkinWeightProfileManager, UWorldPartitionSubsystem, UDataflowSimulationManager, ULandscapeSubsystem, and FSlateRHIResourceManager.
Used to determine if an object should be ticked when the game is paused. Defaults to false, as that mimics old behavior.
Reimplemented in FCrowdTickHelper, UQuartzSubsystem, FStreamableDelegateDelayHelper, FSkinWeightProfileManager, FHttpNetworkReplayStreamingFactory, FInMemoryNetworkReplayStreamer, FLocalFileNetworkReplayStreamingFactory, FNullNetworkReplayStreamer, and FSlateRHIResourceManager.
| 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).
| NewTickType | The new tick type of this instance |
|
static |
Tick all FTickableGameObject instances that match the parameters.
| World | Specific world that is ticking, must match GetTickableGameObjectWorld to tick. |
| LevelTickType | The type of tick where LEVELTICK_All is treated like a gameplay tick. |
| bIsPaused | True if the gameplay world is paused, if this is false IsTickableWhenPaused must return true to tick. |
| DeltaTime | Game time passed since the last call. |
| FTickableGameObject::UE_NONCOPYABLE | ( | FTickableGameObject | ) |
Tickable objects cannot be copied safely due to the auto registration