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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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
Comments
- …
More skills from this repository
screen-reader-testing
41kHas your agent test websites using screen readers to ensure they are accessible.
wcag-audit-patterns
41kHelps your agent audit websites for accessibility and fix issues according to WCAG guidelines.
multi-reviewer-patterns
41kEnables your agent to coordinate parallel code reviews, deduplicating findings and consolidating reports.
parallel-debugging
41kAllows the agent to debug complex issues with parallel investigations and root cause analysis.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.