Navigation
API > API/Runtime > API/Runtime/MassEntity
The type responsible for hosting Entities managing Archetypes. Entities are stored as FEntityData entries in a chunked array. Each valid entity is assigned to an Archetype that stored fragments associated with a given entity at the moment.
FMassEntityManager supplies API for entity creation (that can result in archetype creation) and entity manipulation. Even though synchronized manipulation methods are available in most cases the entity operations are performed via a command buffer. The default command buffer can be obtained with a Defer() call. FMassEntityManager are meant to be stored with a TSharedPtr or TSharedRef. Some of Mass API pass around FMassEntityManager& but programmers can always use AsShared() call to obtain a shared ref for a given manager instance (as supplied by deriving from TSharedFromThis
| Name | FMassEntityManager |
| Type | struct |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassEntityManager.h |
| Include Path | #include "MassEntityManager.h" |
Syntax
struct FMassEntityManager :
public TSharedFromThis< FMassEntityManager > ,
public FGCObject
Inheritance Hierarchy
- FGCObject → FMassEntityManager
- FSharedFromThisBase → TSharedFromThis → FMassEntityManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMassEntityManager
(
UObject* InOwner |
MassEntityManager.h | ||
FMassEntityManager
(
const FMassEntityManager& Other |
MassEntityManager.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMassEntityManager() |
MassEntityManager.h |
Structs
| Name | Remarks |
|---|---|
| FScopedProcessing | |
| TSharedFragmentsContainer | This is a struct wrapping shared fragment management to ensure consistency between how shared and const shared fragment are added and fetched, across all the functions that do that |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FEntityCreationContext | UE::Mass::ObserverManager::FCreationContext | MassEntityManager.h | |
| FEntityStorageContainerType | TVariant< FEmptyVariantState, UE::Mass::FSingleThreadedEntityStorage, UE::Mass::FConcurrentEntityStorage > | MassEntityManager.h | |
| FOnNewArchetypeDelegate | TMulticastDelegate_OneParam< void, const FMassArchetypeHandle & > | MassEntityManager.h | |
| FStructInitializationCallback | TFunctionRef< void(void *Fragment, const UScriptStruct &FragmentType)> | MassEntityManager.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| InvalidEntity | const FMassEntityHandle | MassEntityManager.h | |
| NumCommandBuffers | int32 | This index will be enough to control which buffer is available for pushing commands since flashing is taking place in the game thread and pushing commands to the buffer fetched by Defer() is only supported also on the game thread (due to checking the cached thread ID). | MassEntityManager.h |
| NumReservedEntities | int32 | Index 0 is reserved so we can treat that index as an invalid entity handle. | MassEntityManager.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FMassDebugger | friend | MassEntityManager.h | ||
| FMassEntityQuery | friend | MassEntityManager.h | ||
| FMassExecutionContext | friend | MassEntityManager.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllArchetypes | TArray< TSharedPtr< FMassArchetypeData > > | Contains all archetypes ever created. | MassEntityManager.h | |
| ArchetypeDataVersion | uint32 | The "version" number increased every time an archetype gets added | MassEntityManager.h | |
| bCommandBufferFlushingInProgress | std::atomic< bool > | MassEntityManager.h | ||
| bFirstCommandFlush | bool | MassEntityManager.h | ||
| ConstSharedFragmentsContainer | TSharedFragmentsContainer< FConstSharedStruct > | MassEntityManager.h | ||
| DeferredCommandBuffers | TStaticArray< TSharedPtr< FMassCommandBuffer >, NumCommandBuffers > | MassEntityManager.h | ||
| EntityStorage | FEntityStorageContainerType | MassEntityManager.h | ||
| FragmentHashToArchetypeMap | TMap< uint32, TArray< TSharedPtr< FMassArchetypeData > > > | Map of hash of sorted fragment list to archetypes with that hash. | MassEntityManager.h | |
| FragmentTypeToArchetypeMap | TMap< const UScriptStruct *, TArray< TSharedPtr< FMassArchetypeData > > > | Map to list of archetypes that contain the specified fragment type. | MassEntityManager.h | |
| GroupNameToTypeIndex | TMap< const FName, const int32 > | MassEntityManager.h | ||
| GroupTypes | TArray< const FName > | MassEntityManager.h | ||
| InitializationState | EInitializationState | MassEntityManager.h | ||
| ObserverManager | FMassObserverManager | MassEntityManager.h | ||
| OnNewArchetypeEvent | FOnNewArchetypeDelegate | MassEntityManager.h | ||
| OnPostForkHandle | FDelegateHandle | MassEntityManager.h | ||
| OpenedCommandBufferIndex | uint8 | MassEntityManager.h | ||
| Owner | TWeakObjectPtr< UObject > | MassEntityManager.h | ||
| ProcessingScopeCount | std::atomic< int32 > | MassEntityManager.h | ||
| RelationManager | UE::Mass::FRelationManager | MassEntityManager.h | ||
| SharedFragmentsContainer | TSharedFragmentsContainer< FSharedStruct > | MassEntityManager.h | ||
| SparseElementsStorage | UE::Mass::FSparseElementsStorage | Stores sparse elements instances. Not accessible from outside on purpose. | MassEntityManager.h | |
| TypeManager | TSharedRef< UE::Mass::FTypeManager > | MassEntityManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddCompositionToEntity_GetDelta
(
FMassEntityHandle EntityHandle, |
Adds elements indicated by InOutDescriptor to the entity indicated by EntityHandle. | MassEntityManager.h | |
bool AddConstSharedFragmentToEntity
(
const FMassEntityHandle EntityHandle, |
Adds a new const shared fragment to the given entity. | MassEntityManager.h | |
void AddElementToEntities
(
TConstArrayView< FMassEntityHandle > Entities, |
DEPRECATED. | MassEntityManager.h | |
void AddElementToEntity
(
FMassEntityHandle Entity, |
Adds ElementType to the entity, treating it accordingly based on which element type it represents (i.e. Fragment or Tag). | MassEntityManager.h | |
void AddFragmentInstanceListToEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
void AddFragmentListToEntity
(
FMassEntityHandle EntityHandle, |
Ensures that only unique fragments are added. | MassEntityManager.h | |
void AddFragmentToEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
void AddFragmentToEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
bool AddSharedFragmentToEntity
(
const FMassEntityHandle EntityHandle, |
Adds a new shared fragment to the given entity. | MassEntityManager.h | |
void AddSparseElementsToEntity
(
FMassEntityHandle EntityHandle, |
Adds sparse elements indicated by ElementsBitset to the entity indicated by EntityHandle. | MassEntityManager.h | |
void AddSparseElementToEntity
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
T & AddSparseElementToEntity
(
FMassEntityHandle EntityHandle |
Adds a sparse fragment to the entity and returns a reference to the newly created fragments. | MassEntityManager.h | |
FStructView AddSparseElementToEntity
(
FMassEntityHandle EntityHandle, |
Adds sparse element indicated by ElementType to the entity indicated by EntityHandle. | MassEntityManager.h | |
void AddTagToEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
void AppendCommands
(
const TSharedPtr< FMassCommandBuffer >& InOutCommandBuffer |
Depending on the current state of Manager's command buffer the function will either move all the commands out of InOutCommandBuffer into the main command buffer or append it to the list of command buffers waiting to be flushed. | MassEntityManager.h | |
void BatchAddElementToEntities
(
TConstArrayView< FMassEntityHandle > Entities, |
Adds ElementType to the entities, treating it accordingly based on which element type it represents (i.e. Fragment or Tag). | MassEntityManager.h | |
void BatchAddFragmentInstancesForEntities
(
TConstArrayView< FMassArchetypeEntityCollectionWithPayload > EntityCollections, |
MassEntityManager.h | ||
void BatchAddFragmentInstancesForEntities
(
TConstArrayView< FMassArchetypeEntityCollectionWithPayload > EntityCollections, |
Adds fragment types with per-entity values, tags, and shared fragment values — all in a single entity move. | MassEntityManager.h | |
void BatchAddFragmentInstancesForEntities
(
TConstArrayView< FMassArchetypeEntityCollectionWithPayload > EntityCollections, |
Adds fragment types, sets their per-entity values, and adds shared fragment values — all in a single entity move. | MassEntityManager.h | |
void BatchAddFragmentInstancesForEntities
(
TConstArrayView< FMassArchetypeEntityCollectionWithPayload > EntityCollections, |
Adds fragment types with per-entity values AND tags to entities in a single entity move. | MassEntityManager.h | |
void BatchAddSharedFragmentsForEntities
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
Adds a new const and non-const shared fragments to all entities provided via EntityCollections | MassEntityManager.h | |
void BatchAddSparseElementToEntities
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
MassEntityManager.h | ||
TSharedRef< FEntityCreationContext > BatchBuildEntities
(
const FMassArchetypeEntityCollectionWithPayload& EncodedEntitiesWithPayload, |
MassEntityManager.h | ||
TSharedRef< FEntityCreationContext > BatchBuildEntities
(
const FMassArchetypeEntityCollectionWithPayload& EncodedEntitiesWithPayload, |
MassEntityManager.h | ||
TSharedRef< FEntityCreationContext > BatchBuildEntities
(
const FMassArchetypeEntityCollectionWithPayload& EncodedEntitiesWithPayload, |
MassEntityManager.h | ||
void BatchChangeCompositionForEntities
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
Overload that also adds shared fragment values during the same entity move. | MassEntityManager.h | |
void BatchChangeCompositionForEntities
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
MassEntityManager.h | ||
void BatchChangeFragmentCompositionForEntities
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
MassEntityManager.h | ||
void BatchChangeTagsForEntities
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
MassEntityManager.h | ||
TSharedRef< FEntityCreationContext > BatchCreateEntities
(
const FMassArchetypeHandle& ArchetypeHandle, |
A version of CreateEntity that's creating a number of entities (Count) in one go | MassEntityManager.h | |
TSharedRef< FEntityCreationContext > BatchCreateEntities
(
const FMassArchetypeHandle& ArchetypeHandle, |
MassEntityManager.h | ||
bool BatchCreateRelations
(
TArrayView< FMassEntityHandle > Subjects, |
MassEntityManager.h | ||
bool BatchCreateRelations
(
const UE::Mass::FTypeHandle RelationTypeHandle, |
MassEntityManager.h | ||
TSharedRef< FEntityCreationContext > BatchCreateReservedEntities
(
const FMassArchetypeHandle& ArchetypeHandle, |
A version of CreateEntity that's creating a number of entities (Count) in one go | MassEntityManager.h | |
TSharedRef< FEntityCreationContext > BatchCreateReservedEntities
(
const FMassArchetypeHandle& ArchetypeHandle, |
MassEntityManager.h | ||
void BatchDestroyEntities
(
TConstArrayView< FMassEntityHandle > InEntities |
Destroys all the entities in the provided array of entities. | MassEntityManager.h | |
void BatchDestroyEntityChunks
(
TConstArrayView< FMassArchetypeEntityCollection > Collections |
MassEntityManager.h | ||
void BatchDestroyEntityChunks
(
const FMassArchetypeEntityCollection& Collection |
Destroys all the entities provided via the Collection. | MassEntityManager.h | |
void BatchGroupEntities
(
const UE::Mass::FArchetypeGroupHandle GroupHandle, |
Assigns all entities indicated by InEntities to a given archetype group. | MassEntityManager.h | |
void BatchGroupEntities
(
const UE::Mass::FArchetypeGroupHandle GroupHandle, |
Assigns all entities indicated by Collections to a given archetype group. | MassEntityManager.h | |
void BatchRemoveConstSharedFragmentFromEntities
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
Removes the specified const shared fragment types from all entities in the provided collections. | MassEntityManager.h | |
void BatchRemoveElementFromEntities
(
TConstArrayView< FMassEntityHandle > Entities, |
Removes ElementType from the entities, treating it accordingly based on which element type it represents (i.e. Fragment or Tag). | MassEntityManager.h | |
void BatchRemoveSharedFragmentFromEntities
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
Removes the specified shared fragment types from all entities in the provided collections. | MassEntityManager.h | |
void BatchRemoveSparseElementFromEntities
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
MassEntityManager.h | ||
TConstArrayView< FMassEntityHandle > BatchReserveEntities
(
const int32 Count, |
Reserves Count number of entities and appends them to InOutEntities | MassEntityManager.h | |
int32 BatchReserveEntities
(
TArrayView< FMassEntityHandle > InOutEntities |
Reserves number of entities corresponding to number of entries in the provided array view InOutEntities. | MassEntityManager.h | |
void BatchSetEntityFragmentValues
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
MassEntityManager.h | ||
void BatchSetEntityFragmentValues
(
TConstArrayView< FMassArchetypeEntityCollection > EntityCollections, |
MassEntityManager.h | ||
void BatchSetEntityFragmentValues
(
const FMassArchetypeEntityCollection& SparseEntities, |
MassEntityManager.h | ||
void BatchSetEntityFragmentValues
(
const FMassArchetypeEntityCollection& SparseEntities, |
Copies values from FragmentInstanceList over to fragments of given entities collection. | MassEntityManager.h | |
void BuildEntity
(
FMassEntityHandle EntityHandle, |
Builds an entity for it to be ready to be used by the subsystem | MassEntityManager.h | |
void BuildEntity
(
FMassEntityHandle EntityHandle, |
Builds an entity for it to be ready to be used by the subsystem | MassEntityManager.h | |
void CheckIfEntityIsActive
(
FMassEntityHandle EntityHandle |
Asserts that IsEntityBuilt | MassEntityManager.h | |
void CheckIfEntityIsValid
(
FMassEntityHandle EntityHandle |
Asserts that IsEntityValid | MassEntityManager.h | |
FMassArchetypeHandle CreateArchetype
(
FMassArchetypeHandle SourceArchetype, |
A special, relaxed but slower version of CreateArchetype functions that allows FragmentAngTagsList to contain both fragments and tags. | MassEntityManager.h | |
FMassArchetypeHandle CreateArchetype
(
const TSharedPtr< FMassArchetypeData >& SourceArchetype, |
Creates an archetype like SourceArchetype + InFragments. | MassEntityManager.h | |
FMassArchetypeHandle CreateArchetype
(
const FMassElementBitSet& ElementBitSet, |
CreateArchetype from a mass element bitset and initial values | MassEntityManager.h | |
FMassArchetypeHandle CreateArchetype
(
TConstArrayView< const UScriptStruct* > FragmentsAndTagsList, |
A special, relaxed but slower version of CreateArchetype functions that allows FragmentAngTagsList to contain both fragments and tags. | MassEntityManager.h | |
FMassArchetypeHandle CreateArchetype
(
FMassArchetypeHandle SourceArchetype, |
A special, relaxed but slower version of CreateArchetype functions that allows FragmentAngTagsList to contain both fragments and tags. | MassEntityManager.h | |
FMassArchetypeHandle CreateArchetype
(
const FMassArchetypeCompositionDescriptor& Composition, |
CreateArchetype from a composition descriptor and initial values | MassEntityManager.h | |
FMassArchetypeHandle CreateArchetype
(
const TSharedPtr< FMassArchetypeData >& SourceArchetype, |
Creates an archetype like SourceArchetype + InFragments. | MassEntityManager.h | |
FMassEntityHandle CreateEntity
(
const FMassArchetypeHandle& ArchetypeHandle, |
Creates fully built entity ready to be used by the subsystem | MassEntityManager.h | |
FMassEntityHandle CreateEntity
(
TConstArrayView< FInstancedStruct > FragmentInstanceList, |
Creates fully built entity ready to be used by the subsystem | MassEntityManager.h | |
FMassEntityHandle CreateEntityIndexHandle
(
const int32 EntityIndex |
Generate valid, up-to-date entity handle for the entity at given index. | MassEntityManager.h | |
FMassExecutionContext CreateExecutionContext
(
const float DeltaSeconds |
Creates and initializes a FMassExecutionContext instance. | MassEntityManager.h | |
| MassEntityManager.h | |||
UE::Mass::FSparseElementIterator CreateSparseElementsIterator
(
TNotNull< const UScriptStruct* > ElementType |
Creates UE::Mass::FSparseElementIterator instance that can be used to iterate over all instances of a given sparse element fragment Note: works only for sparse fragments, as tags contain no data. | MassEntityManager.h | |
FMassCommandBuffer & Defer() |
MassEntityManager.h | ||
void Deinitialize() |
MassEntityManager.h | ||
void DestroyEntity
(
FMassEntityHandle EntityHandle |
Destroys a fully built entity, use ReleaseReservedEntity if entity was not yet built. | MassEntityManager.h | |
void DoEntityCompaction
(
const double TimeAllowed |
Go through all archetypes and compact entities | MassEntityManager.h | |
bool DoesEntityHaveElement
(
FMassEntityHandle Entity, |
MassEntityManager.h | ||
bool DoesEntityHaveElement
(
FMassEntityHandle Entity |
MassEntityManager.h | ||
UE::Mass::FArchetypeGroupType FindOrAddArchetypeGroupType
(
const FName GroupName |
Fetches FArchetypeGroupType instance (copy) associated with the given GroupName. | MassEntityManager.h | |
void FlushCommands () |
MassEntityManager.h | ||
void FlushCommands
(
const TSharedPtr< FMassCommandBuffer >& InCommandBuffer |
MassEntityManager.h | ||
void ForEachArchetype
(
int32 BeginRange, |
MassEntityManager.h | ||
void ForEachConstSharedFragment
(
TFunctionRef< void(const T&) > ExecuteFunction |
MassEntityManager.h | ||
void ForEachConstSharedFragmentConditional
(
TFunctionRef< bool(const T&) > ConditionFunction, |
MassEntityManager.h | ||
void ForEachSharedFragment
(
TFunctionRef< void(T&) > ExecuteFunction |
INLINE. | MassEntityManager.h | |
void ForEachSharedFragmentConditional
(
TFunctionRef< bool(T&) > ConditionFunction, |
MassEntityManager.h | ||
FMassArchetypeCompositionDescriptor GetArchetypeComposition
(
const FMassArchetypeHandle& ArchetypeHandle |
MassEntityManager.h | ||
uint32 GetArchetypeDataVersion() |
MassEntityManager.h | ||
FMassArchetypeHandle GetArchetypeForEntity
(
FMassEntityHandle EntityHandle |
Fetches the archetype for a given EntityHandle. | MassEntityManager.h | |
FMassArchetypeHandle GetArchetypeForEntityUnsafe
(
FMassEntityHandle EntityHandle |
Fetches the archetype for a given EntityHandle. | MassEntityManager.h | |
ConstSharedFragmentType & GetConstSharedFragmentDataChecked
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
ConstSharedFragmentType * GetConstSharedFragmentDataPtr
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
FConstStructView GetConstSharedFragmentDataStruct
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
FConstStructView GetElementDataStruct
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
FragmentType & GetFragmentDataChecked
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
FragmentType * GetFragmentDataPtr
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
FStructView GetFragmentDataStruct
(
FMassEntityHandle EntityHandle, |
Returns a FStructView for the given fragment on the specified entity. | MassEntityManager.h | |
UE::Mass::FArchetypeGroupHandle GetGroupForEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
const UE::Mass::FArchetypeGroups & GetGroupsForArchetype
(
const FMassArchetypeHandle& ArchetypeHandle |
MassEntityManager.h | ||
void GetMatchingArchetypes
(
const FMassFragmentRequirements& Requirements, |
Searches through all known archetypes and matches them to the provided requirements. | MassEntityManager.h | |
FStructView GetMutableSparseElementDataForEntity
(
TNotNull< const UScriptStruct* > ElementType, |
MassEntityManager.h | ||
FMassObserverManager & GetObserverManager() |
MassEntityManager.h | ||
FOnNewArchetypeDelegate & GetOnNewArchetypeEvent() |
MassEntityManager.h | ||
const FConstSharedStruct & GetOrCreateConstSharedFragment
(
const T& Fragment |
Shared fragments. | MassEntityManager.h | |
const FConstSharedStruct & GetOrCreateConstSharedFragment
(
const FConstStructView HashingHelperStruct, |
Returns or creates a shared struct associated to a given shared fragment set of values identified internally by a CRC. | MassEntityManager.h | |
const FConstSharedStruct & GetOrCreateConstSharedFragment
(
const UScriptStruct& InScriptStruct, |
Returns or creates a shared struct associated to a given shared fragment set of values identified internally by a CRC. | MassEntityManager.h | |
const FConstSharedStruct & GetOrCreateConstSharedFragment
(
TArgs&&... InArgs |
Returns or creates a shared struct associated to a given shared fragment set of values identified internally by a CRC. | MassEntityManager.h | |
const FSharedStruct & GetOrCreateSharedFragment
(
TArgs&&... InArgs |
Returns or creates a shared struct associated to a given shared fragment set of values identified internally by a CRC. | MassEntityManager.h | |
const FSharedStruct & GetOrCreateSharedFragment
(
const T& Fragment |
Returns or creates a shared struct associated to a given shared fragment set of values identified internally by a CRC. | MassEntityManager.h | |
const FSharedStruct & GetOrCreateSharedFragment
(
const FConstStructView HashingHelperStruct, |
Returns or creates a shared struct associated to a given shared fragment set of values identified internally by a CRC. | MassEntityManager.h | |
const FSharedStruct & GetOrCreateSharedFragment
(
const UScriptStruct& InScriptStruct, |
Returns or creates a shared struct associated to a given shared fragment set of values identified internally by a CRC. | MassEntityManager.h | |
FMassArchetypeHandle GetOrCreateSuitableArchetype
(
const FMassArchetypeHandle& ArchetypeHandle, |
MassEntityManager.h | ||
FMassArchetypeHandle GetOrCreateSuitableArchetype
(
const FMassArchetypeHandle& ArchetypeHandle, |
A helper function to be used when creating entities with shared fragments provided, or when adding shared fragments to existing entities | MassEntityManager.h | |
TSharedRef< FEntityCreationContext > GetOrMakeCreationContext () |
The main use-case for this function is to create a blank FEntityCreationContext and hold on to it while creating a bunch of entities (with multiple calls to BatchCreate* and/or BatchBuild*) and modifying them (with mutating batched API) while not causing multiple Observers to trigger. | MassEntityManager.h | |
| Fetches the observers lock (as hosted by FMassObserverManager). | MassEntityManager.h | ||
UObject * GetOwner() |
MassEntityManager.h | ||
UE::Mass::FRelationManager & GetRelationManager() |
Relations. | MassEntityManager.h | |
void GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
MassEntityManager.h | ||
SharedFragmentType & GetSharedFragmentDataChecked
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
SharedFragmentType * GetSharedFragmentDataPtr
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
FConstStructView GetSharedFragmentDataStruct
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
TConstArrayView< FSharedStruct > GetSharedFragmentsOfType() |
MassEntityManager.h | ||
FConstStructView GetSparseElementDataForEntity
(
TNotNull< const UScriptStruct* > ElementType, |
MassEntityManager.h | ||
FMassElementBitSet GetSparseElementsBitSetForEntity
(
const FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
const UE::Mass::FTypeManager & GetTypeManager () |
Sub-Managers. | MassEntityManager.h | |
| MassEntityManager.h | |||
| Fetches the world associated with the Owner. | MassEntityManager.h | ||
void Initialize () |
Default to use single threaded implementation | MassEntityManager.h | |
void Initialize
(
const FMassEntityManagerStorageInitParams& InitializationParams |
MassEntityManager.h | ||
bool IsDuringEntityCreation() |
MassEntityManager.h | ||
bool IsEntityActive
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
bool IsEntityBuilt
(
FMassEntityHandle EntityHandle |
Whether the entity handle represents an entity that has been fully built (expecting a valid EntityHandle) | MassEntityManager.h | |
bool IsEntityReserved
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
bool IsEntityValid
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
bool IsProcessing () |
Indicates whether there are processors out there performing operations on this instance of MassEntityManager. | MassEntityManager.h | |
UE::Mass::FEntityBuilder MakeEntityBuilder() |
Entity Builder. | MassEntityManager.h | |
void MoveEntityToAnotherArchetype
(
FMassEntityHandle EntityHandle, |
Moves an entity over to a new archetype by copying over fragments common to both archetypes | MassEntityManager.h | |
FScopedProcessing NewProcessingScope() |
MassEntityManager.h | ||
void OnNewTypeRegistered
(
UE::Mass::FTypeHandle RegisteredTypeHandle |
Type management. | MassEntityManager.h | |
void PostInitialize() |
MassEntityManager.h | ||
void ReleaseReservedEntity
(
FMassEntityHandle EntityHandle |
Releases a previously reserved entity handle that was not yet built, otherwise call DestroyEntity | MassEntityManager.h | |
void RemoveCompositionFromEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
bool RemoveConstSharedFragmentFromEntity
(
const FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
bool RemoveConstSharedFragmentFromEntity
(
const FMassEntityHandle EntityHandle, |
Removes a const shared fragment of the given type from the entity. | MassEntityManager.h | |
bool RemoveConstSharedFragmentFromEntity
(
const FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
void RemoveElementFromEntities
(
TConstArrayView< FMassEntityHandle > Entities, |
MassEntityManager.h | ||
void RemoveElementFromEntity
(
FMassEntityHandle Entity, |
Removes ElementType from the entity, treating it accordingly based on which element type it represents (i.e. Fragment or Tag). | MassEntityManager.h | |
void RemoveEntityFromGroupType
(
FMassEntityHandle EntityHandle, |
Removes EntityHandle from any-and-all groups of given type - i.e. the entity will be moved to an archetype not in any of the groups of the given type. | MassEntityManager.h | |
void RemoveFragmentFromEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
void RemoveFragmentListFromEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
bool RemoveSharedFragmentFromEntity
(
const FMassEntityHandle EntityHandle, |
Removes a shared fragment of the given type from the entity. | MassEntityManager.h | |
bool RemoveSharedFragmentFromEntity
(
const FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
void RemoveSparseElementFromEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
void RemoveSparseElementFromEntity
(
FMassEntityHandle EntityHandle |
MassEntityManager.h | ||
void RemoveTagFromEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
FMassEntityHandle ReserveEntity() |
Reserves an entity in the subsystem, the entity is still not ready to be used by the subsystem, need to call BuildEntity() | MassEntityManager.h | |
void SetDebugName
(
const FString& NewDebugGame |
MassEntityManager.h | ||
void SetEntityFragmentValues
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h | ||
void SetEntityFragmentValues
(
FMassEntityHandle EntityHandle, |
Copies values from FragmentInstanceList over to target entity's fragment. | MassEntityManager.h | |
bool SwapConstSharedFragmentForEntity
(
const FMassEntityHandle EntityHandle, |
Adds a new const shared fragment to the given entity if it doesn't have a shared fragment of the given type, moves it to its new archetype and notify observers. | MassEntityManager.h | |
void SwapTagsForEntity
(
FMassEntityHandle EntityHandle, |
MassEntityManager.h |
Public Virtual
Overridden from FGCObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& Collector |
MassEntityManager.h | ||
virtual FString GetReferencerName() |
MassEntityManager.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void GetMatchingArchetypes
(
const FMassFragmentRequirements& Requirements, |
MassEntityManager.h | ||
void InternalAppendFragmentsAndTagsToArchetypeCompositionDescriptor
(
FMassArchetypeCompositionDescriptor& InOutComposition, |
MassEntityManager.h | ||
FMassArchetypeHandle InternalCreateSimilarArchetype
(
const TSharedPtr< FMassArchetypeData >& SourceArchetype, |
A "similar" archetype is an archetype exactly the same as SourceArchetype except for one composition aspect like Fragments or "Tags" | MassEntityManager.h | |
FMassArchetypeHandle InternalCreateSimilarArchetype
(
const FMassArchetypeData& SourceArchetypeRef, |
MassEntityManager.h | ||
FMassArchetypeHandle InternalCreateSimilarArchetype
(
const TSharedPtr< FMassArchetypeData >& SourceArchetype, |
MassEntityManager.h | ||
void OnPostFork
(
EForkProcessRole Role |
Called on the child process upon process's forking | MassEntityManager.h | |
void OnRelationTypeRegistered
(
UE::Mass::FTypeHandle RegisteredTypeHandle, |
MassEntityManager.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void ForEachArchetypeChunkEntityList
(
const FMassArchetypeHandle& ArchetypeHandle, |
List all entities in an archetype per chunk. | MassEntityManager.h | |
static void ForEachArchetypeElementType
(
const FMassArchetypeHandle& ArchetypeHandle, |
Method to iterate on all the element (fragments, tags, etc.) types of an archetype. | MassEntityManager.h | |
static void ForEachArchetypeFragmentType
(
const FMassArchetypeHandle& ArchetypeHandle, |
Method to iterate on all the fragment types of an archetype | MassEntityManager.h |
See Also
- FMassCommandBuffer for more details.