Unity C# scripting
Writes and fixes Unity 6.3 LTS C# gameplay scripts.
Safety check
- Pipes an installer straight into the shell: references/agent-checks.md line 54
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: unity-csharp-scripting
description: >
Writes and fixes Unity 6.3 LTS C# gameplay scripts: MonoBehaviour lifecycle, serialization,
.meta/GUID discipline and command-line tests. Use for new or renamed .cs files, "Missing script"
or a field missing from the Inspector. Not for physics (`unity-physics`), input
(`unity-input-system`), data assets (`unity-scriptableobjects`) or builds
(`unity-build-pipeline`).
---
# Unity C# Scripting (MonoBehaviour)
Write correct gameplay scripts for Unity 6.3 LTS (6000.3), C# 9 on .NET Standard 2.1, keep the
project's `.meta` files intact, and prove the result compiles and behaves without opening the
Editor by hand.
## When to use
- Authoring or fixing a `MonoBehaviour`: lifecycle callbacks, component references,
serialized fields, coroutines, `async` with `Awaitable`.
- Creating, moving, renaming or deleting scripts and assets from the file system.
- Compiling or testing a Unity project from a terminal or CI, for any Unity skill.
- The project has `Assets/`, `ProjectSettings/` and `*.cs` files.
**When not to use:** rigidbodies and collision response → `unity-physics`; reading player
input → `unity-input-system`; shared data assets and config → `unity-scriptableobjects`;
Animator parameters → `unity-animation`; building players → `unity-build-pipeline`.
## Workflow
1. **Read the project's versions first.** `ProjectSettings/ProjectVersion.txt` gives the
Editor version; `Packages/manifest.json` the packages; any `*.asmdef` files tell you which
assembly a new script lands in. Keep the project's version unless asked to upgrade. On
a Unity 6 Editor other than 6000.3, check any API you are unsure of in that version's docs:
grep `https://docs.unity3d.com/<major.minor>/Documentation/ScriptReference/xrefmap.yml` for
the member, then read its page under
`https://docs.unity.com/en-us/engine/<major.minor>/script-reference/` (for example
`unityengine/rigidbody2d/addforce.md`). Before Unity 6, read
`https://docs.unity3d.com/<major.minor>/Documentation/ScriptReference/<Class>.<Member>.html`
instead. Package docs are in `Library/PackageCache/<package>@*/Documentation~/`.
...From gamedev-skills's repository, Apache-2.0 licence.
Related skills
-
Checked
Game Audio Mixing
Sets up game audio buses, volume sliders, music ducking and adaptive music for Godot, Unity or FMOD.
8/101 credit -
Checked
Game camera tuning
Builds and tunes follow, orbit and first person game cameras in Godot or Cinemachine so they stop jittering.
8/101 credit -
Checked
Game Enemy AI
Designs enemy AI with perception, pathfinding and steering so enemies chase fairly and never get stuck.
8/101 credit -
Checked
Game Loop and Timing
Makes movement, timers and physics behave the same at any frame rate in Unity, Godot, Bevy and web games.
7/101 credit -
Checked
Godot Game Testing
Writes and runs Godot tests with gdUnit4 or GUT, including scene tests and headless runs that report real results.
7/101 credit -
Checked
Game Security Review
Reviews Unity, Godot and Unreal code for cheats that hurt other players, purchase exploits and unsafe save files.
7/101 credit