Navigation
API > API/Runtime > API/Runtime/MassEntity
Removes a single element type from entities at runtime. Requires PushUniqueCommand — each call creates a separate command instance (no cross-call batching). Supports all element types including shared and const shared fragments.
When to use: when the element type is only known at runtime and you need to remove a single type. Prefer FMassCommandRemoveElements
Example: // Single entity: FMassCommandRemoveElement& Cmd = Context.Defer().PushUniqueCommand
Supported types: all FMassElement subtypes (fragments, tags, shared, const shared, sparse). Breakpoint support: No (runtime types — use FMassCommandRemoveElements
| Name | FMassCommandRemoveElement |
| Type | struct |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassCommands.h |
| Include Path | #include "MassCommands.h" |
Syntax
struct FMassCommandRemoveElement : public FMassBatchedEntityCommand
Inheritance Hierarchy
- FMassBatchedCommand → FMassBatchedEntityCommand → FMassCommandRemoveElement
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMassCommandRemoveElement
(
const TNotNull< const UScriptStruct* > InElementType |
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 void Run
(
FMassEntityManager& EntityManager |
MassCommands.h |