Skip to content
Skillpedia
General coding41k · #4871

unity-ecs-patterns

Helps your agent build high-performance games in Unity. It uses advanced techniques to optimize performance and handle many elements.

What it does

This guide teaches how to build high-performance games in Unity using an approach called ECS. It helps organize game data efficiently so the computer can process it faster, especially when there are many elements on screen.

When to use it

  • ✓Building Unity games that need to run very fast.
  • ✓Managing hundreds or thousands of game objects without slowdowns.
  • ✓Optimizing code so the game uses fewer computer resources.

Example of what to ask your AI

“How can I make my Unity game run faster with many enemies on screen?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/wshobson/agents/blob/main/plugins/game-development/skills/unity-ecs-patterns/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/game-development/skills/unity-ecs-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It explains how to organize game data into 'components' and the logic that uses them into 'systems'. This allows the computer to process lots of information at once, instead of one by one.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add wshobson/agents --skill unity-ecs-patterns

Or download just the file:

curl -L https://raw.githubusercontent.com/wshobson/agents/main/plugins/game-development/skills/unity-ecs-patterns/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Unity ECS Patterns

Production patterns for Unity's Data-Oriented Technology Stack (DOTS) including Entity Component System, Job System, and Burst Compiler.

When to Use This Skill

  • Building high-performance Unity games
  • Managing thousands of entities efficiently
  • Implementing data-oriented game systems
  • Optimizing CPU-bound game logic
  • Converting OOP game code to ECS
  • Using Jobs and Burst for parallelization

Core Concepts

1. ECS vs OOP

Aspect Traditional OOP ECS/DOTS
Data layout Object-oriented Data-oriented
Memory Scattered Contiguous
Processing Per-object Batched
Scaling Poor with count Linear scaling
Best for Complex behaviors Mass simulation

2. DOTS Components

Entity: Lightweight ID (no data)
Component: Pure data (no behavior)
System: Logic that processes components
World: Container for entities
Archetype: Unique combination of components
Chunk: Memory block for same-archetype entities

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

Do's

  • Use ISystem over SystemBase - Better performance
  • Burst compile everything - Massive speedup
  • Batch structural changes - Use ECB
  • Profile with Profiler - Identify bottlenecks
  • Use Aspects - Clean component grouping

Don'ts

  • Don't use managed types - Breaks Burst
  • Don't structural change in jobs - Use ECB
  • Don't over-architect - Start simple
  • Don't ignore chunk utilization - Group similar entities
  • Don't forget disposal - Native collections leak
FAQ

What is ECS?

ECS stands for Entity Component System. It's a way to organize your game's data so the computer can process it very efficiently, improving performance.

What are DOTS, Jobs, and Burst?

These are Unity technologies that work with ECS to make data processing even faster, allowing the computer to do multiple things at once and optimize complex calculations.

Do I need to be an expert programmer to use this?

This guide is for learners. It explains the basic concepts and gives examples to help understand how to use these advanced techniques more simply.

Details

Original description by the author

Master Unity ECS (Entity Component System) with DOTS, Jobs, and Burst for high-performance game development. Use when building data-oriented games, optimizing performance, or working with large entity counts.

repo: wshobson/agents

Popularity

GitHub stars
41k
Ranking position
#4871
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills