ue-actor-component-arc…
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing or debugging Mass Entity ECS code in Unreal Engine C++ — processors, queries, fragments, tags, observers, traits, spawning and large-scale agent simulation. Also use when the user mentions 'MassEntity', 'UMassProcessor', 'FMassEntityQuery', 'ForEachEntityChunk',
Claude Code
$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-mass-entity --agent claude-code
Codex
$ npx skills add quodsoler/unreal-engine-skills --skill ue-mass-entity -a codex -y
Cursor
$ npx skills add quodsoler/unreal-engine-skills --skill ue-mass-entity -a cursor -y
Gemini CLI
$ npx skills add quodsoler/unreal-engine-skills --skill ue-mass-entity -a gemini-cli -y
GitHub Copilot
$ npx skills add quodsoler/unreal-engine-skills --skill ue-mass-entity -a github-copilot -y
OpenCode
$ npx skills add quodsoler/unreal-engine-skills --skill ue-mass-entity -a opencode -y
Windsurf
$ npx skills add quodsoler/unreal-engine-skills --skill ue-mass-entity -a windsurf -y
name: ue-mass-entity description: "Use when writing or debugging Mass Entity ECS code in Unreal Engine C++ — processors, queries, fragments, tags, observers, traits, spawning and large-scale agent simulation. Also use when the user mentions 'MassEntity', 'UMassProcessor', 'FMassEntityQuery', 'ForEachEntityChunk', 'FMassEntityManager', 'FMassFragment', 'FMassTag', 'FTransformFragment', 'UMassObserverProcessor', 'ObservedTypes', 'Defer', 'archetype', 'AMassSpawner', 'entity config asset', 'MassCrowd', 'ISM crowd', 'entity relations', or 'thousands of agents'. For State Tree behavior on entities, see ue-state-trees; for ZoneGraph and Smart Objects, see ue-ai-navigation; for thread-safety rules, see ue-async-threading." metadata: version: "2.0.0" engine: "5.8"
Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".
Mass is an archetype Entity Component System for simulating thousands of agents with cache-friendly data layouts and multi-threaded processors. The core lives in the always-available runtime modules `MassEntity` and `MassCore` (plus `MassSignals`, `MassEngine`); gameplay-facing pieces (spawning, representation, movement, LOD, replication, actor bridging) come from the **MassGameplay (Experimental in 5.8)** plugin, and navigation/behavior from **MassAI (Experimental in 5.8)** and **MassCrowd (Experimental in 5.8)**.
Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.
Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.
| Request is about… | Go to | |---|---| | Build.cs, includes, "enable the plugin" | [Modules and Build.cs](#modules-and-buildcs) | | Declaring fragments, tags, shared/chunk data | [Fragments, Tags and Archetypes](#fragments-tags-and-archetypes) | | Creating/destroying entities, direct mutation | [FMassEntityManager](#fmassentitymanager) | | Writing a processor, scheduling, phases | [UMassProcessor](#umassprocessor) | | Selecting entities, requirements, filtering | [FMassEntityQuery](#fmassentityquery) | | Reading/writing fragment data in a loop | [Iteration and FMassExecutionContext](#iteration-and-fmassexecutioncontext) | | Adding/removing fragments during iteration | [Deferred Commands](#deferred-commands) | | Reacting to fragment/tag add or remove | [UMassObserverProcessor](#umassobserverprocessor) | | One entity outside a processor, fluent build | [Single-Entity Access and FEntityBuilder](#single-entity-access-and-fentitybuilder) | | Parent/child links, archetype grouping | [Relations and Archetype Groups](#relations-and-archetype-groups) | | Traits, config assets, `AMassSpawner` | [Traits, Config Assets and Spawning](#traits-config-assets-and-spawning) | | ISM rendering, LOD, actor promotion | [Representation and LOD](#representation-and-lod) | | Crowds, lanes, entity AI | [Crowd, Navigation and Behavior](#crowd-navigation-and-behavior) |
Longer templates live in [mass-entity-patterns.md](references/mass-entity-patterns.md); built-in types and fields in [mass-fragment-reference.md](references/mass-fragment-reference.md).
There is no MassEntity plugin to enable. `MassEntity` and `MassCore` are runtime modules that ship with the engine — add them to `Build.cs` and they link. Only the gameplay layers are plugins, and those must be enabled in the `.uproject`.
PublicDependencyModuleNames.AddRange(new string[] {
"Core", "CoreUObject", "Engine",
"MassEntity", // manager, processors, queries, commands, relations
"MassCore", // FMassFragment/FMassTag bases, FTransformFragment, traits
"MassSignals", // UMassSignalSubsystem, UMassSignalProcessorBase
"MassCommon", // UE::Mass::ProcessorGroupNames (MassGameplay)
"MassSpawner", // UMassEntityTraitBase, AMassSpawner (MassGameplay)
"MassMovement", // FMassVelocityFragment (MassGameplay)
"MassRepresentation", // ISM visualization + LOD (MassGameplay)
"MassActors", // UMassAgentComponent, actor bridging (MassGameplay)
"MassNavigation", // FMassMoveTargetFragment (MassAI)
});Include paths that moved into `MassCore` are namespaced under `Mass/`: `Mass/EntityElementTypes.h`, `Mass/EntityFragments.h`, `Mass/EntityHandle.h`, `Mass/ExternalSubsystemTraits.h`, `Mass/ArchetypeGroup.h`. `MassEntityTypes.h` still pulls the element bases in transitively; prefer the explicit `Mass/` path.
| Concept | Base / type | Purpose | |---|---|---| | Entity | `FMassEntityHandle` | Index + SerialNumber identity handle | | Fragment | `FMassFragment` | Per-entity mutable data | | Sparse fragment | `FMassSparseFragment` | Per-entity data stored outside the archetype (no entity move on add) | | Tag | `FMassTag` | Zero-size marker used for filtering | | Sparse tag | `FMassSparseTag` | Marker added/removed without an archetype change | | Chunk fragment | `FMassChunkFragment` | One instance per memory chunk | | Shared fragment | `FMassSharedFragment` | Mutable value shared by entities that reference it | | Const shared fragment | `FMassConstSharedFragment` | Immutable shared configuration | | Archetype | `FMassArchetypeHandle` | A unique fragment/tag composition |
All of these derive from `FMassElement` and are declared in `Mass/EntityElementTypes.h`.
// MyMassTypes.h
#pragma once
#include "Mass/EntityElementTypes.h"
#include "MyMassTypes.generated.h"
USTRUCT()
struct FMyHealthFragment : public FMassFragment
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, Category = "Mass")
float Current = 100.f;
UPROPERTY(EditAnywhere, Category = "Mass")
floA collection of 31 AI agent skills for Unreal Engine C++ development. Built for game developers who want AI coding agents to help write correct, production-quality UE5 C++ code.
Use when writing or debugging AActor and UActorComponent C++: constructor vs BeginPlay, PostInitializeComponents, EndPlay…
Use when writing Unreal Engine C++ AI — AI controllers, behavior tree nodes, blackboards, AI perception, navmesh pathfinding, EQS…
Use when writing or debugging Unreal Engine animation C++: AnimInstance subclasses, thread-safe update, FAnimInstanceProxy,…
Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers…
Use when playing, mixing or debugging sound in Unreal Engine — one-shot SFX, looping ambience, music, dialogue or procedural…
Use when exposing C++ to Blueprint or calling Blueprint from C++: UFUNCTION(BlueprintCallable), BlueprintPure,…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Design and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI…