unity-ecs-patterns

Provide Unity DOTS patterns for ECS, Job System, and Burst Compiler.

38.6k|4.1k|Updated Jul 24, 2025
One-click install
npx skills add https://github.com/wshobson/agents --skill unity-ecs-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-ecs-patterns
Source: https://github.com/wshobson/agents/tree/main/plugins/game-development/skills/unity-ecs-patterns
Command: npx skills add https://github.com/wshobson/agents --skill unity-ecs-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides production-ready patterns and best practices for leveraging Unity's Data-Oriented Technology Stack (DOTS), including the Entity Component System (ECS), Job System, and Burst Compiler, to build high-performance game experiences.

Core Features & Use Cases

  • ECS Fundamentals: Understand the core concepts of ECS, components, and systems.
  • DOTS Patterns: Implement common patterns like basic ECS setup, systems with ISystem, entity queries, command buffers, aspects, singleton components, baking, and jobs with native collections.
  • Performance Optimization: Learn tips and best practices for maximizing performance using Burst, parallel jobs, and efficient data handling.
  • Use Case: When developing a Unity game that needs to manage thousands of entities efficiently or optimize CPU-bound game logic, this Skill provides the architectural patterns and code examples to achieve high performance.

Quick Start

Show me the code for a basic Unity ECS setup with a Speed component and a MovementSystem.

Frequently Asked Questions about unity-ecs-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a basic Unity ECS system with entity queries and components?

To set up Unity ECS, define components like Speed, implement systems using ISystem, and use entity queries to process data. This Skill provides code examples for a basic ECS setup with a Speed component and MovementSystem.

What is the best way to optimize Unity game performance using the Burst compiler and Job System?

Optimizing Unity game performance with Burst and the Job System involves leveraging parallel jobs and efficient data handling. This Skill offers performance tips and best practices for maximizing CPU-bound game logic using Unity's Data-Oriented Technology Stack.

When do I need Unity ECS and DOTS for my game development project?

You need Unity ECS and DOTS when developing a game that requires managing thousands of entities efficiently or optimizing CPU-bound game logic. This Skill provides architectural patterns for high-performance game experiences.

How do EntityCommandBuffers and singleton components work in Unity ECS?

EntityCommandBuffers handle structural changes safely during system updates, while singleton components manage single-instance data. This Skill covers common DOTS patterns including command buffers, aspects, and singleton components.

Can I use native collections with Unity Job System tasks?

Yes, you can use native collections with Unity Job System tasks to process data efficiently across multiple threads. This Skill provides patterns for implementing jobs with native collections in high-performance game development.