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

entity-query-patterns-requireforupdate-gating

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

Senior-level convention that every `ISystem` / `SystemBase` gates `OnUpdate` with `state.RequireForUpdate<T>()` (or the query overload) so the system only runs when its prerequisites — config singletons, feature toggles, baked content — actually exist. Covers the AND semantics of multiple gates, the empty-tag feature-flag pattern (generalizing the sample `ExecuteXxx` tags), the `state.RequireForUpdate(query)` overload for complex prerequisites, and why this strictly beats `if (!HasSingleton<T>()) return;`. Use when authoring any system, designing a feature toggle, or debugging first-frame "Singleton not found" / `NullReferenceException` crashes.

安装

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

SKILL.md
readonly