This skill helps an agent set up repeatable Unity player builds. It covers the scene list and platform target, the choice between Mono and IL2CPP, managed stripping with a link.xml, and a scripted BuildPlayer call whose result is checked so a failed build fails the pipeline.
It includes a headless command line for CI, a pattern for building a saved Build Profile, and a reference with a parameterised build method that stamps a version and sets exit codes. A gotchas list covers scenes missing from a build, errors that appear only in the player and stale Addressables content.
What You Get
- A seven-step core workflow from the scene list to verifying that the built player runs
- Four patterns: a scripted build with a result check, a headless command, a Build Profile build and a link.xml
- A reference with a CI build method that parses arguments, stamps a version and exits with a code
- A gotchas list covering missing scenes, toolchain failures, stripped reflection code, stale Addressables and platform defines
Common Use Cases
- Setting up a repeatable command-line build for a build server
- Fixing a MissingMethodException that only appears in the built player
- Building one saved Build Profile from the command line
- Making a pipeline fail when BuildPlayer returns errors
What Makes It Unique
The skill spells out batch-mode limits, such as picking the platform with the buildTarget flag since switching targets inside a running method is unavailable, and it warns that Addressables content may be skipped on a clean runner. It stays on the Unity side and sends size work and store uploads to sibling skills.
Under The Hood
The agent loads the SKILL.md and, for CI work, one reference with a complete build script. It edits C# editor scripts, link.xml and project settings files. It can run the Unity Editor on the command line in batch mode with an execute-method flag to build a player and read the exit code and log, and the skill shows how to launch the built player to check it. It warns against putting license credentials in command arguments, shell history or logs. Nothing is fetched from the web during normal use; documentation pages are named for re-checking.