unity-ecs-patterns

Design Unity ECS gameplay systems with Burst-compatible ISystem workflows.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Jhabbig/Habbig --skill unity-ecs-patterns-jhabbig
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-ecs-patterns
Source: https://github.com/Jhabbig/Habbig/tree/main/.claude/plugins/wshobson/game-development/skills/unity-ecs-patterns
Command: npx skills add https://github.com/Jhabbig/Habbig --skill unity-ecs-patterns-jhabbig

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design and optimize Unity gameplay systems that must handle large entity counts, reduce CPU bottlenecks, and move from object-oriented code to data-oriented architecture.

Core Features & Use Cases

  • ECS and DOTS foundations: Defines components, systems, queries, archetypes, chunks, and singleton patterns for Unity's data-oriented stack.
  • Performance-oriented workflows: Shows how to use Burst, Jobs, ISystem, IJobEntity, and Native Collections for fast parallel processing.
  • Structural change handling: Demonstrates entity command buffers, baking from GameObjects, aspects, and safe deferred updates.
  • Use case: Ideal for building scalable simulations, crowd behavior, combat swarms, spawners, and other gameplay logic that must stay performant at runtime.

Quick Start

Ask for a Unity ECS implementation plan or code example for a gameplay system, and specify the components, performance goals, and whether you need jobs, Burst, baking, or command buffers.

Frequently Asked Questions about unity-ecs-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle structural changes safely in Unity ECS without breaking job processing?

To handle structural changes in Unity ECS, use entity command buffers for deferred updates. This prevents invalidating chunk data during job execution and safely applies archetype modifications after parallel processing completes.

What is the best way to optimize entity queries for high-performance Unity DOTS gameplay?

Optimizing entity queries in Unity DOTS requires defining specific component filters and utilizing chunk iteration. This reduces CPU bottlenecks by ensuring systems only process relevant chunks of data.

How do I convert GameObjects to entities using Unity ECS baking workflows?

Converting GameObjects to entities uses Unity ECS baking workflows. Baking translates GameObjects and subscenes into optimized entity archetypes at build time, enabling fast runtime instantiation for large-scale simulations.

Can I use Burst compilation with ISystem workflows for parallel processing in Unity?

Yes, Burst compilation works seamlessly with ISystem workflows in Unity. Combining Burst with IJobEntity and Native Collections enables fast, parallel processing of large entity counts while maintaining data-oriented architecture.

When do I need to use aspects and singletons in Unity ECS gameplay systems?

Use aspects in Unity ECS to group related component data for cleaner system logic, and use singletons for global state access. Both simplify code when managing complex entity interactions and cross-system dependencies.

Why does my Unity ECS job throw errors when accessing entity data concurrently?

Unity ECS job errors during concurrent access happen when structural changes invalidate chunk data or when Native Collections lack proper safety handles. Implementing entity command buffers ensures safe deferred data modification.