Agent skill · Frontend

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".

gamedev-skillsgithub.com/gamedev-skillsGitHub ↗
claude-codeclinecodexcursorcopilotwindsurfApache-2.0
Install
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.

Facts
Files in the skill folder: 2
SKILL.md size: 6 KB
Bundled scripts: none
Requires: Unity 6 (6000.0 LTS); also valid for 2022 LTS
Path: skills/unity/unity-csharp-scripting/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 406
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When to use
  2. Core workflow
  3. Patterns
  4. 1. Lifecycle + cached components (the canonical skeleton)
  5. 2. Safe component access with TryGetComponent
  6. 3. Serialization that shows up correctly in the Inspector
  7. 4. Coroutines for time-sequenced logic
  8. Pitfalls
  9. References
  10. Related skills
Ships with 1 file
  • references/lifecycle-and-coroutines.md
More from awesome-gamedev-agent-skills
All skills →
About this skill
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.

Keep going