wshobson avatar

Unity Ecs Patterns

This breaks down Unity's DOTS architecture with actual production patterns you'll need when moving from GameObject-based code to ECS. It covers the core shift from object-oriented to data-oriented design, shows proper ISystem implementation with Burst compilation, and handles the tricky bits like Entity Command Buffers for structural changes and Aspects for grouping related components. The examples focus on real scenarios like movement systems, entity spawning, and query optimization. If you're dealing with thousands of entities or need serious performance gains from parallelization, this gives you the concrete patterns to structure your ECS code properly instead of fighting the paradigm shift.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
10
skills.sh installs
12.5K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill unity-ecs-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

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

AspectTraditional OOPECS/DOTS
Data layoutObject-orientedData-oriented
MemoryScatteredContiguous
ProcessingPer-objectBatched
ScalingPoor with countLinear scaling
Best forComplex behaviorsMass 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

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
Frontend Development, Debugging, Cloud & Infrastructure, Game Development

More from wshobson/agents

All 174
1callstackincubator avatargithub-actionscallstackincubator/agent-skillsGitHub Actions workflow patterns for React Native iOS simulator and Android emulator cloud builds with downloadable artifacts. Use when setting up CI build pipe12Kskills.sh installs
2amazonappdev avatarvega-multi-tv-migrationamazonappdev/devices-agent-skillsMigrate Vega OS (Amazon Fire TV) applications to multi-platform React Native monorepo supporting Android TV, Apple TV, and other platforms. Covers analysis, imp11.2Kskills.sh installs
3brightdata avatarscrapebrightdata/skillsScrape web content as clean markdown/HTML/JSON via the Bright Data CLI (`bdata scrape`). Use when the user wants to fetch a page, extract content from a list of11Kskills.sh installs
4msw-git avatarmsw-scriptingmsw-git/msw-ai-coding-plugins-officialAuthoring MSW scripts (.mlua) plus integrated playtest and debugging. Covers mlua syntax, annotations (@Component/@Logic/@ExecSpace/@Sync), lifecycle, exec spac10.7Kskills.sh installs
5msw-git avatarmsw-paintermsw-git/msw-ai-coding-plugins-officialWhen msw-search cannot find a suitable sprite RUID, draw a pixel art sprite directly with SVG / HTML5 Canvas / HTML code, render it to PNG, and upload it via th10.6Kskills.sh installs
6msw-git avatarmsw-sprite-ruidmsw-git/msw-ai-coding-plugins-officialSpriteRendererComponent.SpriteRUID (world) and SpriteGUIRendererComponent.ImageRUID (UI) — native RUID type support (sprite / animationclip direct playback), th10.5Kskills.sh installs