Navigation
API > API/Runtime > API/Runtime/MassEntity
MassProcessingPhaseManager owns separate FMassProcessingPhase instances for every ETickingGroup. When activated via Start function it registers and enables the FMassProcessingPhase instances which themselves are tick functions that host UMassCompositeProcessor which they trigger as part of their Tick function. MassProcessingPhaseManager serves as an interface to said FMassProcessingPhase instances and allows initialization with collections of processors (via Initialize function) as well as registering arbitrary functions to be called when a particular phase starts or ends (via GetOnPhaseStart and GetOnPhaseEnd functions).
| Name | FMassProcessingPhaseManager |
| Type | struct |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassProcessingPhaseManager.h |
| Include Path | #include "MassProcessingPhaseManager.h" |
Syntax
struct FMassProcessingPhaseManager :
public FGCObject ,
public TSharedFromThis< FMassProcessingPhaseManager >
Inheritance Hierarchy
- FGCObject → FMassProcessingPhaseManager
- FSharedFromThisBase → TSharedFromThis → FMassProcessingPhaseManager
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMassProcessingPhaseManager
(
const FMassProcessingPhaseManager& Other |
MassProcessingPhaseManager.h | ||
FMassProcessingPhaseManager
(
EProcessorExecutionFlags InProcessorExecutionFlags |
MassProcessingPhaseManager.h |
Structs
| Name | Remarks |
|---|---|
| FPhaseGraphBuildState |
Enums
Protected
| Name | Remarks |
|---|---|
| EDynamicProcessorOperationType |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FDynamicProcessorOperation | TPair< TStrongObjectPtr< UMassProcessor >, EDynamicProcessorOperationType > | Using TStrongObjectPtr to not worry about GC while the processor instances are waiting in PendingDynamicProcessors | MassProcessingPhaseManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TConstArrayView< FPhaseGraphBuildState > DebugGetProcessingGraphBuildStates() |
MassProcessingPhaseManager.h | ||
TConstArrayView< FMassProcessingPhase > DebugGetProcessingPhases() |
MassProcessingPhaseManager.h | ||
void Deinitialize() |
Needs to be called before destruction, ideally before owner's BeginDestroy (a FGCObject's limitation) | MassProcessingPhaseManager.h | |
const TSharedPtr< FMassEntityManager > & GetEntityManager() |
MassProcessingPhaseManager.h | ||
FMassEntityManager & GetEntityManagerRef() |
MassProcessingPhaseManager.h | ||
FString GetName() |
MassProcessingPhaseManager.h | ||
FMassProcessingPhase::FOnPhaseEvent & GetOnPhaseEnd
(
const EMassProcessingPhase Phase |
Retrieves OnPhaseEnd multicast delegate's reference for a given Phase | MassProcessingPhaseManager.h | |
FMassProcessingPhase::FOnPhaseEvent & GetOnPhaseStart
(
const EMassProcessingPhase Phase |
Retrieves OnPhaseStart multicast delegate's reference for a given Phase | MassProcessingPhaseManager.h | |
void Initialize
(
UObject& InOwner, |
Populates hosted FMassProcessingPhase instances with Processors read from MassEntitySettings configuration. | MassProcessingPhaseManager.h | |
bool IsPaused () |
Determine if this Phase Manager is currently paused. | MassProcessingPhaseManager.h | |
bool IsRunning() |
MassProcessingPhaseManager.h | ||
void Pause () |
Pause this phase manager at the earliest opportunity (on next FrameEnd phase end). | MassProcessingPhaseManager.h | |
void RegisterDynamicProcessor
(
UMassProcessor& Processor |
Registers a dynamic processor. | MassProcessingPhaseManager.h | |
void Resume() |
Unpause this phase manager at the earliest opportunity (on next PrePhysics phase start). | MassProcessingPhaseManager.h | |
void Start
(
const TSharedRef< FMassEntityManager >& InEntityManager |
Stores InEntityManager as the entity manager. | MassProcessingPhaseManager.h | |
| Stores EntityManager associated with given world's MassEntitySubsystem and kicks off phase ticking. | MassProcessingPhaseManager.h | ||
void Start
(
const TSharedPtr< FMassEntityManager >& InEntityManager |
MassProcessingPhaseManager.h | ||
void Stop() |
MassProcessingPhaseManager.h | ||
const FGraphEventRef & TriggerPhase
(
const EMassProcessingPhase Phase, |
MassProcessingPhaseManager.h | ||
void UnregisterDynamicProcessor
(
UMassProcessor& Processor |
Removes a previously registered dynamic processor of throws an assert if not found. | MassProcessingPhaseManager.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CreatePhases() |
Creates phase processors instances for each declared phase name, based on MassEntitySettings | MassProcessingPhaseManager.h | |
virtual void EnableTickFunctions
(
const UWorld& World |
Override this function if you want to modify how the phase tick functions get executed. | MassProcessingPhaseManager.h | |
void HandlePendingDynamicProcessorOperations
(
const int32 PhaseIndex |
MassProcessingPhaseManager.h | ||
void OnDebugEntityManagerDeinitialized
(
const FMassEntityManager& |
MassProcessingPhaseManager.h | ||
void OnDebugEntityManagerInitialized
(
const FMassEntityManager& |
MassProcessingPhaseManager.h | ||
void OnNewArchetype
(
const FMassArchetypeHandle& NewArchetype |
MassProcessingPhaseManager.h | ||
void OnPhaseEnd
(
FMassProcessingPhase& Phase |
Called by the given Phase at the very end of its execution function (the FMassProcessingPhase::ExecuteTick), after the FMassProcessingPhase.OnPhaseEnd broadcast delegate | MassProcessingPhaseManager.h | |
void OnPhaseStart
(
FMassProcessingPhase& Phase |
Called by the given Phase at the very start of its execution function (the FMassProcessingPhase::ExecuteTick), even before the FMassProcessingPhase.OnPhaseStart broadcast delegate | MassProcessingPhaseManager.h | |
void RegisterDynamicProcessorInternal
(
TNotNull< UMassProcessor* > Processor |
MassProcessingPhaseManager.h | ||
void UnregisterDynamicProcessorInternal
(
TNotNull< UMassProcessor* > Processor |
MassProcessingPhaseManager.h |
Overridden from FGCObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& Collector |
MassProcessingPhaseManager.h | ||
virtual FString GetReferencerName() |
MassProcessingPhaseManager.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMassProcessingPhaseManager & operator=
(
const FMassProcessingPhaseManager& Other |
MassProcessingPhaseManager.h |