unity-csharp-scripting
Write Unity 6 C# gameplay scripts: the MonoBehaviour lifecycle (Awake/OnEnable/Start/Update/FixedUpdate/LateUpdate), GameObject and component access, coroutines, and Inspector serialization. Use when creating or editing .cs scripts in a Unity project, or when the user mentions MonoBehaviour, Start/Update, GetComponent, SerializeField, coroutines, or "Unity script".
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-csharp-scripting --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Unity C# Scripting (MonoBehaviour) Write correct, idiomatic gameplay scripts in Unity 6. Get the lifecycle, component access, serialization, and coroutines right so behaviour is deterministic and the Inspector stays useful. Targets **Unity 6 (6000.0 LTS)**, C# / .NET Standard 2.1. ## When to use - Use when authoring or fixing a `MonoBehaviour`: choosing the right lifecycle callback, reading/caching components, exposing fields to the Inspector, or running timed logic with coroutines. - Use when the project has `*.cs` files, an `Assembly-CSharp` or `*.asmdef`, and a `ProjectSettings/` folder. **When *not* to use:** moving rigidbodies / collision response → `unity-physics`; reading player input → `unity-input-system`; shared data assets / config → `unity-scriptableobjects`; Animator parameters → `unity-animation`. This skill owns the *script lifecycle and C# plumbing*, not those subsystems. ## Core workflow 1. **Pick the callback by purpose, not habit.** `Awake` (cache references, runs once on load), `OnEnable` (subscribe to events), `Start` (init that depends on other objects' `Awake`), `Update` (per-frame logic/input polling), `FixedUpdate` (physics), `LateUpdate` (camera follow a
- When to use
- Core workflow
- Patterns
- 1. Lifecycle + cached components (the canonical skeleton)
- 2. Safe component access with TryGetComponent
- 3. Serialization that shows up correctly in the Inspector
- 4. Coroutines for time-sequenced logic
- Pitfalls
- References
- Related skills
What does the unity-csharp-scripting skill do?
Write Unity 6 C# gameplay scripts: the MonoBehaviour lifecycle (Awake/OnEnable/Start/Update/FixedUpdate/LateUpdate), GameObject and component access, coroutines, and Inspector serialization. Use when creating or editing .cs scripts in a Unity project, or when the user mentions MonoBehaviour, Start/Update, GetComponent, SerializeField, coroutines, or "Unity script".
How do I install it?
Run `npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill unity-csharp-scripting --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From gamedev-skills/awesome-gamedev-agent-skills, a repository with 406 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
