This skill helps an agent write correct MonoBehaviour scripts for Unity 6.3 LTS and keep the project’s .meta files intact. It reads the project’s versions and assembly definitions first, picks lifecycle callbacks by purpose, exposes tunables with private serialized fields and moves every file together with its .meta.
A Python checker reports duplicate or malformed GUIDs, files moved without their .meta and missing script references. A reference shows how to compile and run EditMode and PlayMode tests from a terminal, with or without the Unity CLI, and how to read the results.
What You Get
- A seven-step workflow from reading project versions to proving behavior with a test
- A project checker that reports GUID, .meta and missing-script errors without opening Unity
- Patterns for serialized fields that survive renames and a coroutine that stops cleanly
- A reference with CLI and batch-mode commands, test assembly files and how to read NUnit results
Common Use Cases
- Fixing Missing script after a file was renamed or moved
- Renaming a serialized field without losing scene values
- Compiling a Unity project from a terminal and grepping for compile errors
- Adding an EditMode or PlayMode test for a gameplay change
What Makes It Unique
The skill treats the .meta file as part of the code: it moves each file with its .meta and runs a checker that finds broken GUIDs before Unity does. It also covers command-line proof of behavior, including exit codes that tell a failed test from a run that never finished, and names Unity-specific traps such as null checks on destroyed objects.
Under The Hood
The agent loads the SKILL.md and, as needed, references on lifecycle and on command-line checks. It reads project version and package files, edits C# and assembly definition files, and runs a read-only Python script on the project folder. It can run the Unity Editor in batch mode to compile and run tests, and, when the Unity command line tool and a ready Editor exist, run commands that recompile, run tests and evaluate C# in the running Editor. A reference mentions installing that tool with a downloaded install script piped to a shell, and tells the agent to ask you first. Nothing else is fetched during normal use.