UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Tick::FTaskSyncManager Class Reference

#include <TaskSyncManager.h>

Public Member Functions

ENGINE_API FTaskSyncManager ()
 
ENGINE_API ~FTaskSyncManager ()
 
ENGINE_API FBatchContextId FindDefaultBatch (FWorldContextId WorldContext) const
 
ENGINE_API FSyncPointId FindSyncPoint (FBatchContextId Batch, FName RegisteredName)
 
ENGINE_API FSyncPointId FindSyncPoint (FWorldContextId WorldContext, FName RegisteredName)
 
ENGINE_API FTaskSyncResult GetTaskGraphEvent (FSyncPointId SyncPoint, FGraphEventRef &OutEventRef)
 
ENGINE_API FTaskSyncResult TriggerSyncPoint (FSyncPointId SyncPoint)
 
ENGINE_API FTaskSyncResult TriggerSyncPointAfterEvent (FSyncPointId SyncPoint, FGraphEventRef EventToWairFor)
 
ENGINE_API FTaskSyncResult RegisterWorkHandle (FSyncPointId SyncPoint, FActiveSyncWorkHandle &OutWorkHandle)
 
ENGINE_API FTaskSyncResult RegisterTickGroupWorkHandle (FWorldContextId WorldContext, ETickingGroup TickGroup, FActiveSyncWorkHandle &OutWorkHandle)
 
ENGINE_API FGraphEventRef CreateManualTickTask (FWorldContextId WorldContext, FTickFunction *TickFunction, float DeltaTime=-1.0f, ELevelTick TickType=LEVELTICK_All)
 
ENGINE_API void ReloadRegisteredData ()
 
ENGINE_API bool GetSyncPointDescription (FName RegisteredName, FSyncPointDescription &OutDescription) const
 
ENGINE_API bool RegisterNewSyncPoint (const FSyncPointDescription &NewDescription)
 
ENGINE_API bool UnregisterSyncPoint (FName RegisteredName, FName SourceName)
 
ENGINE_API FBatchContextId CreateNewBatch (FWorldContextId WorldContext)
 
ENGINE_API FWorldContextId GetCurrentWorldContext () const
 
ENGINE_API FTickFunctionGetTickFunctionForSyncPoint (FSyncPointId SyncPoint)
 
ENGINE_API void StartFrame (const UWorld *InWorld, float InDeltaSeconds, ELevelTick InTickType)
 
ENGINE_API void StartTickGroup (const UWorld *InWorld, ETickingGroup TickGroup, TArray< FTickFunction * > &TicksToManualDispatch)
 
ENGINE_API void EndTickGroup (const UWorld *InWorld, ETickingGroup TickGroup)
 
ENGINE_API void EndFrame (const UWorld *InWorld)
 
ENGINE_API void ReleaseWorldContext (FWorldContextId WorldContext)
 

Static Public Member Functions

static ENGINE_API FTaskSyncManagerGet ()
 

Detailed Description

Global singleton manager that can be used to synchronize tasks across different engine systems. This provides event registration and utility functions that wrap functionality in the base Task and TaskGraph systems.

Constructor & Destructor Documentation

◆ FTaskSyncManager()

FTaskSyncManager::FTaskSyncManager ( )

◆ ~FTaskSyncManager()

FTaskSyncManager::~FTaskSyncManager ( )

Member Function Documentation

◆ CreateManualTickTask()

FGraphEventRef FTaskSyncManager::CreateManualTickTask ( FWorldContextId  WorldContext,
FTickFunction TickFunction,
float  DeltaTime = -1.0f,
ELevelTick  TickType = LEVELTICK_All 
)

Creates (but does not dispatch) a simple task that will execute a tick function. The caller is responsible for dispatching the task and must keep the tick function valid until the task completes. This is useful for cases where you want to spawn a tick halfway through a tick group If default delta time is passed, it will try to use the currently ticking world's info

◆ CreateNewBatch()

FBatchContextId FTaskSyncManager::CreateNewBatch ( FWorldContextId  WorldContext)

Allocates a new batch for the specified world, this will duplicate the events

◆ EndFrame()

void FTaskSyncManager::EndFrame ( const UWorld InWorld)

Tells the manager that it is the end of a frame and it will not start/end any more tick groups

◆ EndTickGroup()

void FTaskSyncManager::EndTickGroup ( const UWorld InWorld,
ETickingGroup  TickGroup 
)

Tells the manager that a tick group is complete for a specific world, which could trigger events

◆ FindDefaultBatch()

FBatchContextId FTaskSyncManager::FindDefaultBatch ( FWorldContextId  WorldContext) const

Gets the default batch for a world context. This will return an invalid id if the world context is not set up for ticking

◆ FindSyncPoint() [1/2]

FSyncPointId FTaskSyncManager::FindSyncPoint ( FBatchContextId  Batch,
FName  RegisteredName 
)

Initializes a sync point id that can be passed between threads and used in the functions below. This will return an invalid id if the name is not currently registered. This function does not check that the sync point is enabled for the specific batch, that is handled in the other functions below.

◆ FindSyncPoint() [2/2]

FSyncPointId FTaskSyncManager::FindSyncPoint ( FWorldContextId  WorldContext,
FName  RegisteredName 
)

Same as above, but using the default batch for the world context

◆ Get()

FTaskSyncManager * FTaskSyncManager::Get ( )
static

Return the global singleton if it exists

◆ GetCurrentWorldContext()

FWorldContextId FTaskSyncManager::GetCurrentWorldContext ( ) const

Gets the correct task world context for the current thread context. This will return an invalid context if called on worker threads

◆ GetSyncPointDescription()

bool FTaskSyncManager::GetSyncPointDescription ( FName  RegisteredName,
FSyncPointDescription OutDescription 
) const

Searches for a registered sync point, if ones is foundw ith that name it will return true and fill in OutDescription

◆ GetTaskGraphEvent()

FTaskSyncResult FTaskSyncManager::GetTaskGraphEvent ( FSyncPointId  SyncPoint,
FGraphEventRef OutEventRef 
)

Attempts to return the current frame's task graph event for this sync point, to pass as a dependency to other tasks. This will fail if the task has not yet been created this frame or it has finished executing.

◆ GetTickFunctionForSyncPoint()

FTickFunction * FTaskSyncManager::GetTickFunctionForSyncPoint ( FSyncPointId  SyncPoint)

Returns the tick function representing the specified event, if this returns a valid pointer you can use it for setting dependencies but it should not be modified or stored

◆ RegisterNewSyncPoint()

bool FTaskSyncManager::RegisterNewSyncPoint ( const FSyncPointDescription NewDescription)

Registers a new sync point at runtime. RegisteredName and SourceName must be filled out

◆ RegisterTickGroupWorkHandle()

FTaskSyncResult FTaskSyncManager::RegisterTickGroupWorkHandle ( FWorldContextId  WorldContext,
ETickingGroup  TickGroup,
FActiveSyncWorkHandle OutWorkHandle 
)

Tries to creates a new sync work handle that can be used to reserve or request work to happen on the game thread during a tick group. If it was successful, OutWorkHandle will be set to a handle you can use to request work for this frame or every frame (but not reserve).

◆ RegisterWorkHandle()

FTaskSyncResult FTaskSyncManager::RegisterWorkHandle ( FSyncPointId  SyncPoint,
FActiveSyncWorkHandle OutWorkHandle 
)

Tries to creates a new sync work handle that can be used to reserve or request work to happen as part of a sync point. If it was successful, OutWorkHandle will be set to a handle you can pass between threads and later fulfill or abandon.

◆ ReleaseWorldContext()

void FTaskSyncManager::ReleaseWorldContext ( FWorldContextId  WorldContext)

Tells the manager that it should destroy all tracking info for a world context. This only needs to be called when destroying a test or preview world

◆ ReloadRegisteredData()

void FTaskSyncManager::ReloadRegisteredData ( )

Refresh the registered data from settings

◆ StartFrame()

void FTaskSyncManager::StartFrame ( const UWorld InWorld,
float  InDeltaSeconds,
ELevelTick  InTickType 
)

Tells the manager that it is the start of a frame, which will register the appropriate events

◆ StartTickGroup()

void FTaskSyncManager::StartTickGroup ( const UWorld InWorld,
ETickingGroup  TickGroup,
TArray< FTickFunction * > &  TicksToManualDispatch 
)

Tells the manager that a tick group is starting for a specific world

◆ TriggerSyncPoint()

FTaskSyncResult FTaskSyncManager::TriggerSyncPoint ( FSyncPointId  SyncPoint)

Manually triggers a sync point, this can only be called once per frame

◆ TriggerSyncPointAfterEvent()

FTaskSyncResult FTaskSyncManager::TriggerSyncPointAfterEvent ( FSyncPointId  SyncPoint,
FGraphEventRef  EventToWairFor 
)

Tells the sync point to trigger at the completion of the passed in event/task, this is only possible if it hasn't already been triggered

◆ UnregisterSyncPoint()

bool FTaskSyncManager::UnregisterSyncPoint ( FName  RegisteredName,
FName  SourceName 
)

Unregisters a sync point, this will only delete if if both the registered and source names match


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