Navigation
API > API/Runtime > API/Runtime/MassEntity
This storage backend allows for entities to be concurrently reserved. Reserved entities can also be concurrently freed. Creation of entities (i.e. assignment of an archetype and addition of data into chunks) cannot be done concurrently with this implementation.
| Name | FConcurrentEntityStorage |
| Type | class |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassEntityManagerStorage.h |
| Include Path | #include "MassEntityManagerStorage.h" |
Syntax
class FConcurrentEntityStorage : public UE::Mass::IEntityStorageInterface
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FConcurrentEntityStorage() |
MassEntityManagerStorage.h |
Structs
| Name | Remarks |
|---|---|
| FEntityData |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| EntityCount | uint32 | Number of allocated Entities (only used for viewing in the debugger). | MassEntityManagerStorage.h | |
| EntityFreeIndexList | TArray< int32 > | MassEntityManagerStorage.h | ||
| EntityPages | FEntityData ** | Pointer to array of pages | MassEntityManagerStorage.h | |
| FreeListMutex | UE::FTransactionallySafeMutex | MassEntityManagerStorage.h | ||
| MaxEntitiesPerPage | uint32 | MassEntityManagerStorage.h | ||
| MaxEntitiesPerPageShift | uint32 | MassEntityManagerStorage.h | ||
| MaximumEntityCountShift | uint32 | MassEntityManagerStorage.h | ||
| PageAllocateMutex | UE::FTransactionallySafeMutex | ALWAYS acquire FreeListMutex before this one | MassEntityManagerStorage.h | |
| PageCount | uint32 | MassEntityManagerStorage.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 Acquire
(
const int32 Count, |
MassEntityManagerStorage.h | ||
void Initialize
(
const FMassEntityManager_InitParams_Concurrent& InInitializationParams |
MassEntityManagerStorage.h |
Overridden from IEntityStorageInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 Acquire
(
TArrayView< FMassEntityHandle > OutEntityHandles |
MassEntityManagerStorage.h | ||
virtual FMassEntityHandle AcquireOne() |
Produce a single entity handle | MassEntityManagerStorage.h | |
virtual int32 ComputeFreeSize () |
Returns the number of entities that are free For debug purposes only. | MassEntityManagerStorage.h | |
virtual int32 ForceRelease
(
TConstArrayView< FMassEntityHandle > Handles |
Bypasses Serial Number Check Only use if caller has ensured serial number matches or for debug purposes | MassEntityManagerStorage.h | |
virtual int32 ForceReleaseOne
(
FMassEntityHandle Handle |
MassEntityManagerStorage.h | ||
virtual SIZE_T GetAllocatedSize() |
MassEntityManagerStorage.h | ||
virtual FMassArchetypeData * GetArchetype
(
int32 Index |
MassEntityManagerStorage.h | ||
virtual const FMassArchetypeData * GetArchetype
(
int32 Index |
MassEntityManagerStorage.h | ||
virtual TSharedPtr< FMassArchetypeData > & GetArchetypeAsShared
(
int32 Index |
MassEntityManagerStorage.h | ||
virtual const TSharedPtr< FMassArchetypeData > & GetArchetypeAsShared
(
int32 Index |
MassEntityManagerStorage.h | ||
virtual EEntityState GetEntityState
(
int32 Index |
Returns true if the given entity at index is currently reserved False if free or assigned an archetype | MassEntityManagerStorage.h | |
virtual int32 GetSerialNumber
(
int32 Index |
MassEntityManagerStorage.h | ||
virtual bool IsEntityActive
(
FMassEntityHandle EntityHandle |
MassEntityManagerStorage.h | ||
virtual bool IsValid
(
int32 Index |
Checks if entity at Index is built | MassEntityManagerStorage.h | |
virtual bool IsValidHandle
(
FMassEntityHandle EntityHandle |
Checks if the given handle is valid in the context od this storage, i.e. whether the index is valid and the serial number associated with it matches the handle's | MassEntityManagerStorage.h | |
virtual bool IsValidIndex
(
int32 Index |
Checks if index can be used to access entity data | MassEntityManagerStorage.h | |
virtual int32 Num () |
Returns the number of entities that are not free For debug purposes only. | MassEntityManagerStorage.h | |
virtual int32 Release
(
TConstArrayView< FMassEntityHandle > Handles |
MassEntityManagerStorage.h | ||
virtual int32 ReleaseOne
(
FMassEntityHandle Handle |
MassEntityManagerStorage.h | ||
virtual void SetArchetypeFromShared
(
int32 Index, |
MassEntityManagerStorage.h | ||
virtual void SetArchetypeFromShared
(
int32 Index, |
MassEntityManagerStorage.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool DebugAssumptionsSelfTest() |
MassEntityManagerStorage.h |