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

#include <TaskGraphInterfaces.h>

+ Inheritance diagram for FDelegateGraphTask:

Public Member Functions

 DECLARE_DELEGATE_TwoParams (FDelegate, ENamedThreads::Type, const FGraphEventRef &)
 
ENamedThreads::Type GetDesiredThread ()
 
void DoTask (ENamedThreads::Type CurrentThread, const FGraphEventRef &MyCompletionGraphEvent)
 
 FDelegateGraphTask (const FDelegate &InTaskDeletegate, const TStatId InStatId, ENamedThreads::Type InDesiredThread)
 
- Public Member Functions inherited from FCustomStatIDGraphTaskBase
 FCustomStatIDGraphTaskBase (const TStatId &StatId)
 
TStatId GetStatId () const
 

Static Public Member Functions

static ESubsequentsMode::Type GetSubsequentsMode ()
 
static FGraphEventRef CreateAndDispatchWhenReady (const FDelegate &InTaskDeletegate, const TStatId InStatId, const FGraphEventArray *InPrerequisites=NULL, ENamedThreads::Type InCurrentThreadIfKnown=ENamedThreads::AnyThread, ENamedThreads::Type InDesiredThread=ENamedThreads::AnyThread)
 
static FGraphEventRef CreateAndDispatchWhenReady (const FDelegate &InTaskDeletegate, const TStatId InStatId, const FGraphEventRef &InPrerequisite, ENamedThreads::Type InCurrentThreadIfKnown=ENamedThreads::AnyThread, ENamedThreads::Type InDesiredThread=ENamedThreads::AnyThread)
 

Public Attributes

FDelegate TaskDelegate
 
const ENamedThreads::Type DesiredThread
 

Detailed Description

Task class for more full featured delegate based tasks. Still less efficient than a custom task, but provides all of the args

Constructor & Destructor Documentation

◆ FDelegateGraphTask()

FDelegateGraphTask::FDelegateGraphTask ( const FDelegate &  InTaskDeletegate,
const TStatId  InStatId,
ENamedThreads::Type  InDesiredThread 
)
inline

Task constructor

Parameters
InTaskDelegate- delegate to execute when the prerequisites are complete
InStatId- The stat id for this task.
InDesiredThread- Thread to run on

Member Function Documentation

◆ CreateAndDispatchWhenReady() [1/2]

static FGraphEventRef FDelegateGraphTask::CreateAndDispatchWhenReady ( const FDelegate &  InTaskDeletegate,
const TStatId  InStatId,
const FGraphEventArray InPrerequisites = NULL,
ENamedThreads::Type  InCurrentThreadIfKnown = ENamedThreads::AnyThread,
ENamedThreads::Type  InDesiredThread = ENamedThreads::AnyThread 
)
inlinestatic

Create a task and dispatch it when the prerequisites are complete

Parameters
InTaskDelegate- delegate to execute when the prerequisites are complete
InStatId- The stat id for this task.
InPrerequisites- Handles for prerequisites for this task, can be NULL if there are no prerequisites
InCurrentThreadIfKnown- This thread, if known
InDesiredThread- Thread to run on
Returns
completion handle for the new task

◆ CreateAndDispatchWhenReady() [2/2]

static FGraphEventRef FDelegateGraphTask::CreateAndDispatchWhenReady ( const FDelegate &  InTaskDeletegate,
const TStatId  InStatId,
const FGraphEventRef InPrerequisite,
ENamedThreads::Type  InCurrentThreadIfKnown = ENamedThreads::AnyThread,
ENamedThreads::Type  InDesiredThread = ENamedThreads::AnyThread 
)
inlinestatic

Create a task and dispatch it when the prerequisites are complete

Parameters
InTaskDelegate- delegate to execute when the prerequisites are complete
InStatId- The stat id for this task.
InPrerequisite- Handle for a single prerequisite for this task
InCurrentThreadIfKnown- This thread, if known
InDesiredThread- Thread to run on
Returns
completion handle for the new task

◆ DECLARE_DELEGATE_TwoParams()

FDelegateGraphTask::DECLARE_DELEGATE_TwoParams ( FDelegate  ,
ENamedThreads::Type  ,
const FGraphEventRef  
)

◆ DoTask()

void FDelegateGraphTask::DoTask ( ENamedThreads::Type  CurrentThread,
const FGraphEventRef MyCompletionGraphEvent 
)
inline

◆ GetDesiredThread()

ENamedThreads::Type FDelegateGraphTask::GetDesiredThread ( )
inline

◆ GetSubsequentsMode()

static ESubsequentsMode::Type FDelegateGraphTask::GetSubsequentsMode ( )
inlinestatic

Member Data Documentation

◆ DesiredThread

const ENamedThreads::Type FDelegateGraphTask::DesiredThread

Thread to run delegate on

◆ TaskDelegate

FDelegate FDelegateGraphTask::TaskDelegate

Delegate to fire when task runs


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