Unity ecs patterns

From mtecoYY/ai-baike · View interactive version

Unity ecs patterns is an AI agent skill from the GitHub repository mtecoYY/ai-baike. 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.

How to use this skill

Skill file

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

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

Don'ts

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.