Navigation
API > API/Runtime > API/Runtime/MassEntity
| Name | FMassExecutionContext |
| Type | struct |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassExecutionContext.h |
| Include Path | #include "MassExecutionContext.h" |
Syntax
struct FMassExecutionContext
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMassExecutionContext
(
FMassEntityManager& InEntityManager, |
MassExecutionContext.h | ||
FMassExecutionContext
(
FMassExecutionContext&& Other |
MassExecutionContext.h | ||
FMassExecutionContext
(
const FMassExecutionContext& Other |
MassExecutionContext.h | ||
FMassExecutionContext
(
const FMassExecutionContext& Other, |
MassExecutionContext.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FMassExecutionContext() |
MassExecutionContext.h |
Structs
| Name | Remarks |
|---|---|
| FEntityIterator | Iterator to easily loop through entities in the current chunk. |
| FQueryTransientRuntime | |
| FSparseEntityIterator | A flavor of FEntityIterator that skips all the entities that don't match current query's sparse element requirements. |
| TFragmentView |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FChunkFragmentView | TFragmentView< FStructView > | MassExecutionContext.h | |
| FConstSharedFragmentView | TFragmentView< FConstStructView > | MassExecutionContext.h | |
| FFragmentView | TFragmentView< TArrayView< FMassFragment > > | MassExecutionContext.h | |
| FSharedFragmentView | TFragmentView< FStructView > | MassExecutionContext.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveEntityCreationRequirements | const FMassEntityCreationRequirements * | Active permissions for archetype creation (processor-level when no query is active; query-level otherwise) | MassExecutionContext.h | |
| ArchetypeDataPtr | FMassArchetypeData * | Extremely transient, needs to be kept private. Used for direct access to sparse elements API | MassExecutionContext.h | |
| AuxData | FInstancedStruct | MassExecutionContext.h | ||
| bFlushDeferredCommands | bool | Used to control when the context is allowed to flush commands collected in DeferredCommandBuffer. | MassExecutionContext.h | |
| bHasSparseRequirements | bool | Cached value of current query's HasSparseRequirements() | MassExecutionContext.h | |
| CachedIndirectEntityView | FMassEntityView | Used for indirect fragment access | MassExecutionContext.h | |
| ChunkEntityIndex | FMassEntityInChunkDataHandle | MassExecutionContext.h | ||
| ChunkFragmentViews | TArray< FChunkFragmentView, TInlineAllocator< 4 > > | MassExecutionContext.h | ||
| ConstSharedFragmentViews | TArray< FConstSharedFragmentView, TInlineAllocator< 4 > > | MassExecutionContext.h | ||
| CurrentArchetypeCompositionBitSet | FMassElementBitSet | MassExecutionContext.h | ||
| DeferredCommandBuffer | TSharedPtr< FMassCommandBuffer > | Mz | MassExecutionContext.h | |
| DeltaTimeSeconds | float | MassExecutionContext.h | ||
| EntityCollection | FMassArchetypeEntityCollection | If set this indicates the exact archetype and its chunks to be processed. | MassExecutionContext.h | |
| EntityListView | TArrayView< FMassEntityHandle > | MassExecutionContext.h | ||
| EntityManager | TSharedRef< FMassEntityManager > | MassExecutionContext.h | ||
| ExecutionType | EMassExecutionContextType | MassExecutionContext.h | ||
| FMassArchetypeData | friend | MassExecutionContext.h | ||
| FragmentViews | TArray< FFragmentView, TInlineAllocator< 8 > > | MassExecutionContext.h | ||
| IteratorSerialNumberGenerator | uint32 | Track the serial number for FEntityIterator creation | MassExecutionContext.h | |
| LinkedEntityView | FMassEntityView | Linked entity to allow access to fragments on an entity not in the query, must be bound before access | MassExecutionContext.h | |
| QueriesStack | TArray< FQueryTransientRuntime, TInlineAllocator< 2 > > | We usually expect the queries to go only a single layer deep, so 2 elements here should suffice most of the time | MassExecutionContext.h | |
| RequestedSparseElementsAccess | FMassElementBitSet | MassExecutionContext.h | ||
| SharedFragmentViews | TArray< FSharedFragmentView, TInlineAllocator< 4 > > | MassExecutionContext.h | ||
| SubsystemAccessPtr | TUniquePtr< FMassSubsystemAccess > | MassExecutionContext.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyFragmentRequirements
(
const FMassEntityQuery& RequestingQuery |
MassExecutionContext.h | ||
void BatchCreateEntities
(
const FMassArchetypeHandle& ArchetypeHandle, |
MassExecutionContext.h | ||
void BatchCreateEntities
(
const FMassArchetypeHandle& ArchetypeHandle, |
MassExecutionContext.h | ||
void BindLinkedEntity () |
Binds a linked entity with the link type specified in the current query | MassExecutionContext.h | |
void BindLinkedEntity
(
const FMassEntityLinkFragment& EntityLinkFragment |
Binds a linked entity with a specific link type, use this if you already have the link fragment you wish to bind | MassExecutionContext.h | |
void BuildEntity
(
const FMassArchetypeHandle& ArchetypeHandle, |
MassExecutionContext.h | ||
bool CacheSubsystemRequirements
(
const FMassSubsystemRequirements& SubsystemRequirements |
Processes SubsystemRequirements to fetch and cache all the indicated subsystems. | MassExecutionContext.h | |
void ClearEntityCollection() |
MassExecutionContext.h | ||
void ClearExecutionData() |
MassExecutionContext.h | ||
void ClearFragmentViews
(
const FMassEntityQuery& RequestingQuery |
MassExecutionContext.h | ||
FMassEntityHandle CreateEntity
(
const FMassArchetypeHandle& ArchetypeHandle, |
Validates creation request by the active FMassEntityCreationRequirements and creates an entity of the declared archetype. | MassExecutionContext.h | |
| Creates an Entity Iterator for the current chunk. | MassExecutionContext.h | ||
FSparseEntityIterator CreateSparseEntityIterator() |
Creates an entity iterator for the current chunk that's configured to skip entities that are not matching the current query's sparse element requirements. | MassExecutionContext.h | |
FMassCommandBuffer & Defer() |
MassExecutionContext.h | ||
bool DoesArchetypeHaveElement
(
const UScriptStruct& ElementType |
MassExecutionContext.h | ||
bool DoesArchetypeHaveElement
(
TNotNull< const UScriptStruct* > ElementType |
MassExecutionContext.h | ||
bool DoesArchetypeHaveElement () |
MassExecutionContext.h | ||
bool DoesArchetypeHaveFragment () |
MassExecutionContext.h | ||
bool DoesArchetypeHaveFragment
(
TNotNull< const UScriptStruct* > FragmentType |
MassExecutionContext.h | ||
bool DoesArchetypeHaveFragment
(
const UScriptStruct& ElementType |
MassExecutionContext.h | ||
bool DoesArchetypeHaveTag () |
MassExecutionContext.h | ||
bool DoesArchetypeHaveTag
(
TNotNull< const UScriptStruct* > TagType |
MassExecutionContext.h | ||
bool DoesArchetypeHaveTag
(
const UScriptStruct& ElementType |
MassExecutionContext.h | ||
bool ExecuteSparseElementsFilter
(
const FSparseEntityIterator& EntityIt |
MassExecutionContext.h | ||
void FlushDeferred() |
MassExecutionContext.h | ||
void ForEachEntityInChunk
(
const FMassEntityExecuteFunction& EntityExecuteFunction |
MassExecutionContext.h | ||
const FInstancedStruct & GetAuxData() |
MassExecutionContext.h | ||
const T & GetChunkFragment() |
MassExecutionContext.h | ||
const T * GetChunkFragmentPtr() |
MassExecutionContext.h | ||
int32 GetChunkSerialModificationNumber() |
MassExecutionContext.h | ||
const T & GetConstSharedFragment() |
MassExecutionContext.h | ||
const void * GetConstSharedFragmentPtr
(
const UScriptStruct& SharedFragmentType |
Shared fragment related operations | MassExecutionContext.h | |
const T * GetConstSharedFragmentPtr () |
MassExecutionContext.h | ||
const FMassEntityQuery & GetCurrentQuery() |
MassExecutionContext.h | ||
float GetDeltaTimeSeconds() |
MassExecutionContext.h | ||
TConstArrayView< FMassEntityHandle > GetEntities() |
MassExecutionContext.h | ||
FMassEntityHandle GetEntity
(
const int32 Index |
MassExecutionContext.h | ||
const FMassArchetypeEntityCollection & GetEntityCollection() |
Sparse chunk related operation | MassExecutionContext.h | |
FMassEntityManager & GetEntityManagerChecked() |
Inlines. | MassExecutionContext.h | |
EMassExecutionContextType GetExecutionType() |
MassExecutionContext.h | ||
TConstArrayView< FMassFragment > GetFragmentView
(
const UScriptStruct* FragmentType |
MassExecutionContext.h | ||
TConstArrayView< TFragmentBase > GetFragmentView
(
TNotNull< const UScriptStruct* > FragmentType |
MassExecutionContext.h | ||
TConstArrayView< TFragment > GetFragmentView () |
MassExecutionContext.h | ||
const T * GetIndirectConstFragmentPtr
(
const FMassEntityHandle& FragmentOwner |
MassExecutionContext.h | ||
T * GetIndirectFragmentPtr
(
const FMassEntityHandle& FragmentOwner |
MassExecutionContext.h | ||
const T * GetLinkedEntityConstFragmentPtr() |
MassExecutionContext.h | ||
T * GetLinkedEntityFragmentPtr() |
MassExecutionContext.h | ||
FInstancedStruct & GetMutableAuxData() |
MassExecutionContext.h | ||
T & GetMutableChunkFragment() |
MassExecutionContext.h | ||
T * GetMutableChunkFragmentPtr() |
MassExecutionContext.h | ||
TArrayView< FMassFragment > GetMutableFragmentView
(
const UScriptStruct* FragmentType |
MassExecutionContext.h | ||
TArrayView< TFragmentBase > GetMutableFragmentView
(
TNotNull< const UScriptStruct* > FragmentType |
MassExecutionContext.h | ||
TArrayView< TFragment > GetMutableFragmentView () |
Fragments related operations | MassExecutionContext.h | |
T & GetMutableSharedFragment() |
MassExecutionContext.h | ||
T * GetMutableSharedFragmentPtr() |
MassExecutionContext.h | ||
FStructView GetMutableSparseElement
(
TNotNull< const UScriptStruct* > ElementType, |
MassExecutionContext.h | ||
TFragmentBase * GetMutableSparseElement
(
TNotNull< const UScriptStruct* > ElementType, |
MassExecutionContext.h | ||
TFragment * GetMutableSparseElement
(
const FEntityIterator& EntityIterator |
Sparse elements querying. | MassExecutionContext.h | |
T * GetMutableSubsystem
(
const TSubclassOf< USubsystem > SubsystemClass |
MassExecutionContext.h | ||
T * GetMutableSubsystem () |
MassExecutionContext.h | ||
T & GetMutableSubsystemChecked
(
const TSubclassOf< USubsystem > SubsystemClass |
MassExecutionContext.h | ||
T & GetMutableSubsystemChecked () |
MassExecutionContext.h | ||
int32 GetNumEntities() |
MassExecutionContext.h | ||
TSharedPtr< FMassCommandBuffer > GetSharedDeferredCommandBuffer() |
MassExecutionContext.h | ||
const TSharedRef< FMassEntityManager > & GetSharedEntityManager() |
MassExecutionContext.h | ||
const T & GetSharedFragment() |
MassExecutionContext.h | ||
const T * GetSharedFragmentPtr() |
MassExecutionContext.h | ||
const TFragmentBase * GetSparseElement
(
TNotNull< const UScriptStruct* > ElementType, |
MassExecutionContext.h | ||
const TFragment * GetSparseElement
(
const FEntityIterator& EntityIterator |
MassExecutionContext.h | ||
FConstStructView GetSparseElement
(
TNotNull< const UScriptStruct* > ElementType, |
MassExecutionContext.h | ||
const T * GetSubsystem
(
const TSubclassOf< USubsystem > SubsystemClass |
MassExecutionContext.h | ||
const T * GetSubsystem () |
MassExecutionContext.h | ||
const T & GetSubsystemChecked () |
MassExecutionContext.h | ||
const T & GetSubsystemChecked
(
const TSubclassOf< USubsystem > SubsystemClass |
MassExecutionContext.h | ||
UWorld * GetWorld() |
MassExecutionContext.h | ||
bool HasChunkQueueFunc() |
MassExecutionContext.h | ||
bool HasSparseElement
(
TNotNull< const UScriptStruct* > ElementType, |
MassExecutionContext.h | ||
bool IsCurrentQuery
(
const FMassEntityQuery& Query |
MassExecutionContext.h | ||
void PopQuery
(
const FMassEntityQuery& InQuery |
MassExecutionContext.h | ||
void PostQueryCallback
(
const FMassEntityQuery* SourceQuery |
MassExecutionContext.h | ||
void PreQueryCallback
(
const FMassEntityQuery* SourceQuery |
MassExecutionContext.h | ||
void PushQuery
(
FMassEntityQuery& InQuery |
MassExecutionContext.h | ||
void QueueChunkChecked
(
FMassChunkProcessingQueueParams&& Params |
MassExecutionContext.h | ||
void SetActiveArchetypeRequirements
(
const FMassEntityCreationRequirements* InRequirements |
Set/restore by processor and query push/pop | MassExecutionContext.h | |
void SetAuxData
(
const FInstancedStruct& InAuxData |
MassExecutionContext.h | ||
void SetChunkQueueFunc
(
FMassQueueChunkFunction&& InChunkQueueFunc |
MassExecutionContext.h | ||
void SetCurrentArchetype
(
FMassArchetypeData& Archetype |
MassExecutionContext.h | ||
void SetCurrentArchetypeCompositionDescriptor
(
const FMassArchetypeCompositionDescriptor& Descriptor |
MassExecutionContext.h | ||
bool SetCurrentChunk
(
int32 ChunkIndex, |
Chunk related operations. | MassExecutionContext.h | |
void SetDeferredCommandBuffer
(
const TSharedPtr< FMassCommandBuffer >& InDeferredCommandBuffer |
MassExecutionContext.h | ||
void SetEntityCollection
(
const FMassArchetypeEntityCollection& InEntityCollection |
MassExecutionContext.h | ||
void SetEntityCollection
(
FMassArchetypeEntityCollection&& InEntityCollection |
MassExecutionContext.h | ||
void SetExecutionType
(
EMassExecutionContextType InExecutionType |
MassExecutionContext.h | ||
void SetFlushDeferredCommands
(
const bool bNewFlushDeferredCommands |
Sets bFlushDeferredCommands. | MassExecutionContext.h | |
void SetPostQueryCallback
(
TFunction< void(const FMassEntityQuery*)> Function |
MassExecutionContext.h | ||
void SetPreQueryCallback
(
TFunction< void(const FMassEntityQuery*)> Function |
MassExecutionContext.h | ||
void StoreCurrentArchetypeComposition
(
const FMassElementBitSet& CompositionBitSet |
MassExecutionContext.h | ||
bool ValidateAuxDataType() |
MassExecutionContext.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearFragmentViews () |
MassExecutionContext.h | ||
bool ExecuteSparseChunkFilterImpl
(
const FMassArchetypeChunk& Chunk |
MassExecutionContext.h | ||
bool ExecuteSparseElementsFilterImpl
(
const FSparseEntityIterator& EntityIt |
MassExecutionContext.h | ||
void SetFragmentRequirements
(
const FMassFragmentRequirements& FragmentRequirements |
MassExecutionContext.h | ||
void SetSubsystemRequirements
(
const FMassSubsystemRequirements& SubsystemRequirements |
MassExecutionContext.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FMassExecutionContext & GetDummyInstance() |
For internal use only, should never be exported as part of API | MassExecutionContext.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMassExecutionContext & operator=
(
const FMassExecutionContext& Other |
Explicit assignment used by copy ctor and internal helpers. | MassExecutionContext.h |