Navigation
API > API/Runtime > API/Runtime/MassEntity
Removes any mix of element types from entities at runtime. Element types are provided as UScriptStruct* at construction time. Requires PushUniqueCommand — each call creates a separate command instance (no cross-call batching, but entities batch within a single instance via Add()). Performs a single entity move for all non-sparse types + in-place sparse removal.
When to use: when element types are only known at runtime and you need to remove multiple types at once. Prefer FMassCommandRemoveElements
Example: const UScriptStruct* Types[] = { FMyFragment::StaticStruct(), FMyTag::StaticStruct() }; // Single entity: FMassCommandRemoveElementList& Cmd = Context.Defer().PushUniqueCommand
Supported types: all FMassElement subtypes (fragments, tags, shared, const shared, sparse). Breakpoint support: No (runtime types).
| Name | FMassCommandRemoveElementList |
| Type | struct |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassCommands.h |
| Include Path | #include "MassCommands.h" |
Syntax
struct FMassCommandRemoveElementList : public FMassBatchedEntityCommand
Inheritance Hierarchy
- FMassBatchedCommand → FMassBatchedEntityCommand → FMassCommandRemoveElementList
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMassCommandRemoveElementList
(
TConstArrayView< const UScriptStruct* > InElementTypes |
MassCommands.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Super | FMassBatchedEntityCommand | MassCommands.h |
Functions
Public
Protected Virtual
Overridden from FMassBatchedCommand
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual SIZE_T GetAllocatedSize() |
MassCommands.h | ||
virtual void Run
(
FMassEntityManager& EntityManager |
MassCommands.h |