Navigation
API > API/Runtime > API/Runtime/MassEntity
A struct that converts an arbitrary array of entities of given Archetype into a sequence of continuous entity chunks. The goal is to have the user create an instance of this struct once and run through a bunch of systems. The runtime code usually uses FMassArchetypeChunkIterator to iterate on the chunk collection.
| Name | FMassArchetypeEntityCollection |
| Type | struct |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassArchetypeTypes.h |
| Include Path | #include "MassArchetypeTypes.h" |
Syntax
struct FMassArchetypeEntityCollection
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMassArchetypeEntityCollection
(
TSharedPtr< FMassArchetypeData >& InArchetype, |
MassArchetypeTypes.h | ||
FMassArchetypeEntityCollection
(
const FMassArchetypeHandle& InArchetypeHandle, |
MassArchetypeTypes.h | ||
FMassArchetypeEntityCollection
(
FMassArchetypeHandle&& InArchetype, |
MassArchetypeTypes.h | ||
FMassArchetypeEntityCollection
(
const FMassArchetypeHandle& InArchetype, |
Optimized, special case for a single-entity | MassArchetypeTypes.h | |
| MassArchetypeTypes.h | |||
FMassArchetypeEntityCollection
(
const FMassArchetypeHandle& InArchetype, |
MassArchetypeTypes.h | ||
FMassArchetypeEntityCollection
(
const FMassArchetypeHandle& InArchetypeHandle, |
MassArchetypeTypes.h |
Structs
| Name | Remarks |
|---|---|
| FArchetypeEntityRange |
Enums
Public
| Name | Remarks |
|---|---|
| EDuplicatesHandling | |
| EInitializationType |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FConstEntityRangeArrayView | TConstArrayView< FArchetypeEntityRange > | MassArchetypeTypes.h | |
| FEntityRangeArray | TArray< FArchetypeEntityRange > | MassArchetypeTypes.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Archetype | FMassArchetypeVersionedHandle | Entity indices indicated by EntityRanges are only valid with given Archetype | MassArchetypeTypes.h | |
| Ranges | FEntityRangeArray | MassArchetypeTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Append
(
T&& Other |
Appends ranges of the given FMassArchetypeEntityCollection instance. | MassArchetypeTypes.h | |
int32 DebugCountEntities() |
MassArchetypeTypes.h | ||
bool ExportEntityHandles
(
TArray< FMassEntityHandle >& InOutHandles |
Converts stored entity ranges to FMassEntityHandles and appends them to InOutHandles. | MassArchetypeTypes.h | |
FMassArchetypeHandle GetArchetype() |
MassArchetypeTypes.h | ||
FConstEntityRangeArrayView GetRanges() |
MassArchetypeTypes.h | ||
bool IsEmpty() |
MassArchetypeTypes.h | ||
bool IsSame
(
const FMassArchetypeEntityCollection& Other |
The comparison function that checks if Other is identical to this. | MassArchetypeTypes.h | |
bool IsSameArchetype
(
const FMassArchetypeEntityCollection& Other |
MassArchetypeTypes.h | ||
bool IsSet() |
MassArchetypeTypes.h | ||
bool IsUpToDate() |
MassArchetypeTypes.h | ||
void Reset() |
MassArchetypeTypes.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BuildEntityRanges
(
TStridedView< const int32 > TrueIndices |
MassArchetypeTypes.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FArchetypeEntityRange CreateRangeForEntity
(
const FMassArchetypeHandle& InArchetype, |
MassArchetypeTypes.h | ||
static bool DoesContainOverlappingRanges
(
FConstEntityRangeArrayView Ranges |
MassArchetypeTypes.h |