unity-dots-best-practices

Guide Unity DOTS component and system design for Burst-compatible, allocation-free hot paths.

6|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/dyCuong03/unity-agent-team --skill unity-dots-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-dots-best-practices
Source: https://github.com/dyCuong03/unity-agent-team/tree/main/.claude/skills/unity-dots-best-practices
Command: npx skills add https://github.com/dyCuong03/unity-agent-team --skill unity-dots-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unity DOTS projects often fail to scale or become hard to maintain due to poor data layout, accidental allocations, implicit system ordering, and costly structural changes inside hot paths.

Core Features & Use Cases

  • Design for data layout & access patterns: Guides component, buffer, and blob asset choices to match read/write behavior and reduce contention.
  • Eliminate runtime allocations and sync hazards: Focuses on allocation-free hot paths, careful dependency management, and minimizing sync points.
  • Make execution order explicit: Recommends clear system group attributes and narrow system responsibilities to prevent fragile behavior.
  • Burst/job compatibility guardrails: Provides constraints for Burst-safe code and native container lifetime/allocator rules.
  • Self-check and anti-patterns: Includes a verification checklist and calls out common DOTS pitfalls (e.g., structural changes without ECB).

Quick Start

Use unity-dots-best-practices when designing an ECS component and ISystem that must stay Burst- and job-friendly under 10k–100k entities.

Frequently Asked Questions about unity-dots-best-practices

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

FAQPage Schema
How do I prevent runtime allocations and sync points in Unity DOTS?

Prevent runtime allocations in Unity DOTS by designing allocation-free hot paths, managing job dependencies carefully, and using Entity Command Buffers to batch structural changes, minimizing costly sync points.

What is the best way to schedule Burst-compatible ECS systems for 100k entities?

The best way to schedule Burst-compatible ECS systems is to enforce explicit system ordering, use narrow system responsibilities, and verify NativeContainer lifetime rules to safely simulate 100k entities.

Why do structural changes cause performance regressions in Unity ECS?

Structural changes cause performance regressions in Unity ECS by forcing synchronous sync points that invalidate cached data and break Burst compatibility when executed directly inside hot paths.

How do I design Unity ECS components and blob assets to match read/write behavior?

Design Unity ECS components and blob assets by aligning data layout with access patterns to reduce contention, ensuring efficient read/write behavior across your simulation systems.

Can I use Entity Command Buffers to avoid structural change hazards in Jobs?

Yes, you can use Entity Command Buffers to safely queue structural changes inside Jobs, preventing direct data modification and eliminating sync hazards while maintaining Burst compatibility.

When do I need explicit system ordering attributes in Unity DOTS?

You need explicit system ordering attributes in Unity DOTS when systems share data dependencies, requiring precise update order within system groups to prevent race conditions and fragile execution behavior.