dots-singleton-patterns

Community

Make DOTS single-entity state safe and fast.

AuthordyCuong03
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents silent misuse of DOTS “singletons” by establishing the correct single-entity, single-writer mental model and the required Unity Entities APIs so your code doesn’t fail unpredictably when more than one matching entity exists.

Core Features & Use Cases

  • Correct DOTS singleton contracts: Define singleton components as living on exactly one entity and access them through SystemAPI (GetSingleton, GetSingletonRW, HasSingleton, TryGetSingleton).
  • Creation pathway guidance: Choose and document bake-time, runtime-created, or ECB-system singletons based on immutability and ownership.
  • Safety gating and runtime invariants: Use RequireForUpdate for strict existence guarantees, avoid invalid job-time access patterns, and validate the “exactly one entity” invariant to catch duplicated or missing singletons early.
  • Single-writer rule enforcement: Prevent multiple writers from using GetSingletonRW for the same component, protecting determinism and dependency ordering.

Quick Start

Use dots-singleton-patterns when you need a frame-stable shared configuration or mutable shared state in Unity DOTS that must exist on exactly one entity, then implement RequireForUpdate plus GetSingleton/GetSingletonRW to enforce the invariant at runtime.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: dots-singleton-patterns
Download link: https://github.com/dyCuong03/unity-agent-team/archive/main.zip#dots-singleton-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.