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

Functions

EProcessorExecutionFlags GetProcessorExecutionFlagsForWorld (const UWorld &World)
 
EProcessorExecutionFlags DetermineProcessorExecutionFlags (const UWorld *World, EProcessorExecutionFlags ExecutionFlagsOverride)
 
uint8 DetermineProcessorSupportedTickTypes (const UWorld *World)
 
void CreateEntityCollections (const FMassEntityManager &EntityManager, const TConstArrayView< FMassEntityHandle > Entities, const FMassArchetypeEntityCollection::EDuplicatesHandling DuplicatesHandling, TArray< FMassArchetypeEntityCollection > &OutEntityCollections)
 
FMassEntityManagerGetEntityManager (const UObject *WorldContextObject)
 
FMassEntityManagerGetEntityManager (const UWorld *World)
 
FMassEntityManagerGetEntityManagerChecked (const UWorld &World)
 
template<typename BitSetType , EMassCommandCheckTime CheckTime, typename... TTypes>
BitSetType ConstructBitSet ()
 
template<EMassCommandCheckTime CheckTime, typename... TTypes>
FMassFragmentBitSet ConstructFragmentBitSet ()
 
template<EMassCommandCheckTime CheckTime, typename... TTypes>
FMassTagBitSet ConstructTagBitSet ()
 
template<typename TPred , typename TSwap >
void AbstractSort (const int32 NumElements, TPred &&Predicate, TSwap &&SwapFunctor)
 

Function Documentation

◆ AbstractSort()

template<typename TPred , typename TSwap >
void UE::Mass::Utils::AbstractSort ( const int32  NumElements,
TPred &&  Predicate,
TSwap &&  SwapFunctor 
)
inline

AbstractSort is a sorting function that only needs to know how many items there are, how to compare items at individual locations - where location is in [0, NumElements) - and how to swap two elements at given locations. The main use case is to sort multiple arrays while keeping them in sync. For example:

TArray<float> Lead = { 3.1, 0.2, 2.6, 1.0 }; TArray<UObject*> Payload = { A, B, C, D };

AbstractSort(Lead.Num() // NumElements , [&Lead](const int32 LHS, const int32 RHS) // Predicate { return Lead[LHS] < Lead[RHS]; } , [&Lead, &Payload](const int32 A, const int32 B) // SwapFunctor { Swap(Lead[A], Lead[B]); Swap(Payload[A], Payload[B]); } );

◆ ConstructBitSet()

template<typename BitSetType , EMassCommandCheckTime CheckTime, typename... TTypes>
BitSetType UE::Mass::Utils::ConstructBitSet ( )

◆ ConstructFragmentBitSet()

template<EMassCommandCheckTime CheckTime, typename... TTypes>
FMassFragmentBitSet UE::Mass::Utils::ConstructFragmentBitSet ( )

◆ ConstructTagBitSet()

template<EMassCommandCheckTime CheckTime, typename... TTypes>
FMassTagBitSet UE::Mass::Utils::ConstructTagBitSet ( )

◆ CreateEntityCollections()

MASSENTITY_API void UE::Mass::Utils::CreateEntityCollections ( const FMassEntityManager EntityManager,
const TConstArrayView< FMassEntityHandle Entities,
const FMassArchetypeEntityCollection::EDuplicatesHandling  DuplicatesHandling,
TArray< FMassArchetypeEntityCollection > &  OutEntityCollections 
)

Fills OutEntityCollections with per-archetype FMassArchetypeEntityCollection instances.

Parameters
DuplicatesHandlingused to inform the function whether to expect duplicates.

◆ DetermineProcessorExecutionFlags()

MASSENTITY_API EProcessorExecutionFlags UE::Mass::Utils::DetermineProcessorExecutionFlags ( const UWorld World,
EProcessorExecutionFlags  ExecutionFlagsOverride = EProcessorExecutionFlags::None 
)

based on the given World (which can be null) and 'ExecutionFlagsOverride', the function determines the execution flags to use

◆ DetermineProcessorSupportedTickTypes()

uint8 UE::Mass::Utils::DetermineProcessorSupportedTickTypes ( const UWorld World)

based on the given World (which can be null), the function determines additional level tick types for the processing phases

◆ GetEntityManager() [1/2]

MASSENTITY_API FMassEntityManager * UE::Mass::Utils::GetEntityManager ( const UObject WorldContextObject)

◆ GetEntityManager() [2/2]

MASSENTITY_API FMassEntityManager * UE::Mass::Utils::GetEntityManager ( const UWorld World)

◆ GetEntityManagerChecked()

MASSENTITY_API FMassEntityManager & UE::Mass::Utils::GetEntityManagerChecked ( const UWorld World)

◆ GetProcessorExecutionFlagsForWorld()

MASSENTITY_API EProcessorExecutionFlags UE::Mass::Utils::GetProcessorExecutionFlagsForWorld ( const UWorld World)

returns the current execution mode for the processors calculated from the world network mode