unity-lifecycle
OfficialMaster Unity's execution order and lifecycle.
AuthorNice-Wolf-Studio
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps developers avoid common pitfalls related to Unity's script execution order, initialization timing, and object destruction, preventing bugs like MissingReferenceException and ensuring predictable behavior in builds.
Core Features & Use Cases
- Lifecycle Correctness: Understand and apply patterns for
Awake,Start,OnEnable,OnDisable,OnDestroy, andOnApplicationQuit. - Editor vs. Runtime: Differentiate and correctly use editor-only callbacks like
OnValidateand[ExecuteAlways]. - Async Safety: Safely handle asynchronous operations within the Unity lifecycle using
destroyCancellationToken. - Use Case: Prevent a common bug where a script tries to access a
GameManagerinstance that hasn't been initialized yet by correctly ordering script execution.
Quick Start
Use the unity-lifecycle skill to understand the correct pattern for subscribing to events using OnEnable and OnDisable.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 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: unity-lifecycle Download link: https://github.com/Nice-Wolf-Studio/unity-claude-skills/archive/main.zip#unity-lifecycle Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.