![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MassProcessingPhaseManager.h>
Inheritance diagram for FMassProcessingPhaseManager:Classes | |
| struct | FPhaseGraphBuildState |
Protected Types | |
| enum class | EDynamicProcessorOperationType : uint8 { Add , Remove } |
| using | FDynamicProcessorOperation = TPair< TStrongObjectPtr< UMassProcessor >, EDynamicProcessorOperationType > |
Protected Member Functions | |
| virtual MASSENTITY_API void | AddReferencedObjects (FReferenceCollector &Collector) override |
| virtual FString | GetReferencerName () const override |
| MASSENTITY_API void | RegisterDynamicProcessorInternal (TNotNull< UMassProcessor * > Processor) |
| MASSENTITY_API void | UnregisterDynamicProcessorInternal (TNotNull< UMassProcessor * > Processor) |
| MASSENTITY_API void | HandlePendingDynamicProcessorOperations (const int32 PhaseIndex) |
| virtual MASSENTITY_API void | EnableTickFunctions (const UWorld &World) |
| MASSENTITY_API void | CreatePhases () |
| MASSENTITY_API void | OnPhaseStart (FMassProcessingPhase &Phase) |
| MASSENTITY_API void | OnPhaseEnd (FMassProcessingPhase &Phase) |
| MASSENTITY_API void | OnNewArchetype (const FMassArchetypeHandle &NewArchetype) |
Protected Member Functions inherited from TSharedFromThis< FMassProcessingPhaseManager > | |
| TSharedFromThis () | |
| TSharedFromThis (TSharedFromThis const &) | |
| UE_FORCEINLINE_HINT TSharedFromThis & | operator= (TSharedFromThis const &) |
| ~TSharedFromThis () | |
Additional Inherited Members | |
Public Types inherited from FGCObject | |
| enum class | EFlags : uint32 { None = 0 , RegisterLater = 1 << 0 , AddStableNativeReferencesOnly = 1 << 1 } |
Static Public Member Functions inherited from FGCObject | |
| static COREUOBJECT_API void | StaticInit () |
Static Public Attributes inherited from FGCObject | |
| static COREUOBJECT_API UGCObjectReferencer * | GGCObjectReferencer = nullptr |
Static Protected Member Functions inherited from TSharedFromThis< FMassProcessingPhaseManager > | |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > | SharedThis (OtherType *ThisPtr) |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > | SharedThis (const OtherType *ThisPtr) |
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).
|
protected |
using TStrongObjectPtr to not worry about GC while the processor instances are waiting in PendingDynamicProcessors
|
strongprotected |
|
explicit |
|
delete |
|
overrideprotectedvirtual |
Pure virtual that must be overloaded by the inheriting class. Use this method to serialize any UObjects contained that you wish to keep around.
| Collector | The collector of referenced objects. |
Implements FGCObject.
|
protected |
Creates phase processors instances for each declared phase name, based on MassEntitySettings
| void FMassProcessingPhaseManager::Deinitialize | ( | ) |
Needs to be called before destruction, ideally before owner's BeginDestroy (a FGCObject's limitation)
Override this function if you want to modify how the phase tick functions get executed.
|
inline |
|
inline |
| FString FMassProcessingPhaseManager::GetName | ( | ) | const |
|
inline |
Retrieves OnPhaseEnd multicast delegate's reference for a given Phase
|
inline |
Retrieves OnPhaseStart multicast delegate's reference for a given Phase
|
inlineoverrideprotectedvirtual |
Overload this method to report a name for your referencer
Implements FGCObject.
|
protected |
| void FMassProcessingPhaseManager::Initialize | ( | UObject & | InOwner, |
| TConstArrayView< FMassProcessingPhaseConfig > | ProcessingPhasesConfig, | ||
| const FString & | DependencyGraphFileName = TEXT("") |
||
| ) |
Populates hosted FMassProcessingPhase instances with Processors read from MassEntitySettings configuration. Calling this function overrides previous configuration of Phases.
|
inline |
Determine if this Phase Manager is currently paused.
While paused, phases will transition as usual, but processors will not be executed.
|
inline |
|
protected |
|
protected |
Called by the given Phase at the very end of its execution function (the FMassProcessingPhase::ExecuteTick), after the FMassProcessingPhase.OnPhaseEnd broadcast delegate
|
protected |
Called by the given Phase at the very start of its execution function (the FMassProcessingPhase::ExecuteTick), even before the FMassProcessingPhase.OnPhaseStart broadcast delegate
|
delete |
| void FMassProcessingPhaseManager::Pause | ( | ) |
Pause this phase manager at the earliest opportunity (on next FrameEnd phase end). This allows the current phase cycle to complete before the pause takes effect.
| void FMassProcessingPhaseManager::RegisterDynamicProcessor | ( | UMassProcessor & | Processor | ) |
Registers a dynamic processor. This needs to be a fully formed processor and will be slotted in during the next tick.
|
protected |
| void FMassProcessingPhaseManager::Resume | ( | ) |
Unpause this phase manager at the earliest opportunity (on next PrePhysics phase start).
| void FMassProcessingPhaseManager::Start | ( | const TSharedPtr< FMassEntityManager > & | InEntityManager | ) |
| void FMassProcessingPhaseManager::Start | ( | const TSharedRef< FMassEntityManager > & | InEntityManager | ) |
Stores InEntityManager as the entity manager. It also kicks off phase ticking if the given InEntityManager is tied to a UWorld.
Stores EntityManager associated with given world's MassEntitySubsystem and kicks off phase ticking.
| void FMassProcessingPhaseManager::Stop | ( | ) |
| const FGraphEventRef & FMassProcessingPhaseManager::TriggerPhase | ( | const EMassProcessingPhase | Phase, |
| const float | DeltaTime, | ||
| const FGraphEventRef & | MyCompletionGraphEvent, | ||
| ENamedThreads::Type | CurrentThread = ENamedThreads::GameThread |
||
| ) |
| void FMassProcessingPhaseManager::UnregisterDynamicProcessor | ( | UMassProcessor & | Processor | ) |
Removes a previously registered dynamic processor of throws an assert if not found.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |