Navigation
API > API/Runtime > API/Runtime/MassEntity
This storage backend should be used when the user of MassEntityManager can guarantee that all entity management will be done on a single thread.
| Name | FSingleThreadedEntityStorage |
| Type | class |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassEntityManagerStorage.h |
| Include Path | #include "MassEntityManagerStorage.h" |
Syntax
class FSingleThreadedEntityStorage : public UE::Mass::IEntityStorageInterface
Structs
| Name | Remarks |
|---|---|
| FEntityData |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Entities | TChunkedArray< FEntityData > | MassEntityManagerStorage.h | ||
| EntityFreeIndexList | TArray< int32 > | MassEntityManagerStorage.h | ||
| NextSerialNumber | std::atomic< int32 > | MassEntityManagerStorage.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 Acquire
(
const int32 Count, |
MassEntityManagerStorage.h | ||
void Initialize
(
const FMassEntityManager_InitParams_SingleThreaded& |
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 const FMassArchetypeData * GetArchetype
(
int32 Index |
MassEntityManagerStorage.h | ||
virtual FMassArchetypeData * GetArchetype
(
int32 Index |
MassEntityManagerStorage.h | ||
virtual const TSharedPtr< FMassArchetypeData > & GetArchetypeAsShared
(
int32 Index |
MassEntityManagerStorage.h | ||
virtual 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 |