UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Mass::Executor Namespace Reference

Classes

struct  FMassExecutorDoneTask
 

Functions

FORCEINLINE void ExecuteProcessors (FMassEntityManager &EntityManager, TArrayView< UMassProcessor *const > Processors, FMassExecutionContext &ExecutionContext)
 
void Run (FMassRuntimePipeline &RuntimePipeline, FProcessingContext &ProcessingContext)
 
void RunSparse (FMassRuntimePipeline &RuntimePipeline, FProcessingContext &ProcessingContext, FMassArchetypeHandle Archetype, TConstArrayView< FMassEntityHandle > Entities)
 
void RunSparse (FMassRuntimePipeline &RuntimePipeline, FProcessingContext &ProcessingContext, const FMassArchetypeEntityCollection &EntityCollection)
 
void Run (UMassProcessor &Processor, FProcessingContext &ProcessingContext)
 
void RunProcessorsView (TArrayView< UMassProcessor *const > Processors, FProcessingContext &ProcessingContext, TConstArrayView< FMassArchetypeEntityCollection > EntityCollections)
 
FGraphEventRef TriggerParallelTasks (UMassProcessor &Processor, FProcessingContext &&ProcessingContext, TFunction< void()> OnDoneNotification, ENamedThreads::Type CurrentThread)
 
void RunProcessorsView (TArrayView< UMassProcessor *const > Processors, FProcessingContext &ProcessingContext, const FMassArchetypeEntityCollection *EntityCollection)
 
FGraphEventRef TriggerParallelTasks (UMassProcessor &Processor, FProcessingContext &ProcessingContext, TFunction< void()> OnDoneNotification, ENamedThreads::Type CurrentThread)
 

Function Documentation

◆ ExecuteProcessors()

FORCEINLINE void UE::Mass::Executor::ExecuteProcessors ( FMassEntityManager EntityManager,
TArrayView< UMassProcessor *const >  Processors,
FMassExecutionContext ExecutionContext 
)

◆ Run() [1/2]

MASSENTITY_API void UE::Mass::Executor::Run ( FMassRuntimePipeline RuntimePipeline,
FProcessingContext ProcessingContext 
)

Executes processors in a given RuntimePipeline

◆ Run() [2/2]

MASSENTITY_API void UE::Mass::Executor::Run ( UMassProcessor Processor,
FProcessingContext ProcessingContext 
)

Executes given Processor. Used mainly for triggering calculations via MassCompositeProcessors, e.g processing phases

◆ RunProcessorsView() [1/2]

MASSENTITY_API void UE::Mass::Executor::RunProcessorsView ( TArrayView< UMassProcessor *const >  Processors,
FProcessingContext ProcessingContext,
const FMassArchetypeEntityCollection EntityCollection 
)

◆ RunProcessorsView() [2/2]

MASSENTITY_API void UE::Mass::Executor::RunProcessorsView ( TArrayView< UMassProcessor *const >  Processors,
FProcessingContext ProcessingContext,
TConstArrayView< FMassArchetypeEntityCollection EntityCollections = {} 
)

Executes given Processors array view. This function gets called under the hood by the rest of Run* functions

◆ RunSparse() [1/2]

MASSENTITY_API void UE::Mass::Executor::RunSparse ( FMassRuntimePipeline RuntimePipeline,
FProcessingContext ProcessingContext,
const FMassArchetypeEntityCollection EntityCollection 
)

Similar to the Run function, but instead of using all the entities hosted by ProcessingContext.EntitySubsystem it is processing only the entities given by SparseEntities input parameter.

◆ RunSparse() [2/2]

MASSENTITY_API void UE::Mass::Executor::RunSparse ( FMassRuntimePipeline RuntimePipeline,
FProcessingContext ProcessingContext,
FMassArchetypeHandle  Archetype,
TConstArrayView< FMassEntityHandle Entities 
)

Similar to the Run function, but instead of using all the entities hosted by ProcessingContext.EntitySubsystem it is processing only the entities given by EntityID via the Entities input parameter. Note that all the entities need to be of Archetype archetype. Under the hood the function converts Archetype-Entities pair to FMassArchetypeEntityCollection and calls the other flavor of RunSparse

◆ TriggerParallelTasks() [1/2]

MASSENTITY_API FGraphEventRef UE::Mass::Executor::TriggerParallelTasks ( UMassProcessor Processor,
FProcessingContext &&  ProcessingContext,
TFunction< void()>  OnDoneNotification,
ENamedThreads::Type  CurrentThread = ENamedThreads::GameThread 
)

Triggers tasks executing Processor (and potentially it's children) and returns the task graph event representing the task (the event will be "completed" once all the processors finish running).

Parameters
OnDoneNotificationwill be called after all the processors are done, just after flushing the command buffer. Note that OnDoneNotification will be executed on GameThread.

◆ TriggerParallelTasks() [2/2]

MASSENTITY_API FGraphEventRef UE::Mass::Executor::TriggerParallelTasks ( UMassProcessor Processor,
FProcessingContext ProcessingContext,
TFunction< void()>  OnDoneNotification,
ENamedThreads::Type  CurrentThread 
)
inline