Skip to content
Skillpedia
General coding41k · #6704

unity-ecs-patterns

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.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

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.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

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

5 new skills a week. 1 minute to read.

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.

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
#6704
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills