Skip to main content
在 Manus 中运行任何 Skill
一键导入

singleton-patterns-config-and-access

星标6
分支0
更新时间2026年6月11日 07:42

Senior-level pattern for expressing world-unique data (game config, controls, frame input snapshot, prefab tables) as singleton entities with O(1) `SystemAPI.GetSingleton<T>()` / `GetSingletonRW<T>()` access, gated by `state.RequireForUpdate<T>()`. Covers the >1-instance throw, write-from-parallel safety, scene-merge collision modes, and when "this looks like a static" is actually still a singleton. Use whenever designing config, registries, input state, prefab references, or any data that should exist exactly once per world.

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly