mcpbeat Sign in

Unity Build Pipeline Agent Skill

> IL2CPP vs Mono scripting backend, managed code stripping, scripted BuildPipeline.BuildPlayer, and CI/headless builds. Use when configuring or automating a build, choosing a scripting backend, shrinking build size, or when the user mentions Unity build, player settings, IL2CPP, code stripping, or Addressables.

2k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
401
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill unity-build-pipeline

The instruction itself

10 sections, as written by the author

Unity Build Pipeline

Configure, script, and automate Unity 6 player builds: scenes, platform target, scripting

backend, stripping, and headless/CI builds. Targets Unity 6 (6000.0 LTS).

When to use

  • Use when setting up Build Settings/Profiles, choosing a platform and scripting backend

(Mono vs IL2CPP), reducing build size with managed stripping, scripting a repeatable build

with BuildPipeline.BuildPlayer, or wiring a CI/headless build.

  • Use when the project has ProjectSettings/EditorBuildSettings.asset or a CI build script.

When *not* to use: authoring a CI service config end-to-end is DevOps; this skill covers

the Unity-side build API and settings. Console/platform certification specifics are

platform-NDA territory. Storefront submission → steam-publish / itch-publish.

Core workflow

  • List the scenes to build (File → Build Profiles/Settings → Scene List, or

EditorBuildSettings.scenes). Only listed, enabled scenes ship; scene 0 is the start scene.

  • Pick the platform target and switch the active build target if needed

(BuildTarget / EditorUserBuildSettings).

  • Choose the scripting backend (Player Settings): Mono (fast iteration, desktop) vs

IL2CPP (AOT C++; required for many platforms, better perf, harder to reverse). IL2CPP

needs the platform's C++ toolchain installed.

  • Tune size/perf: set Managed Stripping Level (Disabled → Minimal → Low → Medium → High)

and protect reflection-only code with a link.xml. Set Quality Settings per platform.

  • Script the build with BuildPipeline.BuildPlayer(BuildPlayerOptions) and **inspect the

returned BuildReport** — a non-Succeeded result must fail your pipeline.

  • Run headless for CI with -batchmode -quit -executeMethod, and check the exit code.
  • Verify the actual output runs (launch the player), not just that the build returned

without throwing.

Patterns

1. Scripted build with a result check

using UnityEditor;
using UnityEditor.Build.Reporting;
using UnityEngine;

public static class BuildScript
{
    [MenuItem("Build/Windows x64")]
    public static void BuildWindows()
    {
        var options = new BuildPlayerOptions
        {
            scenes = new[] { "Assets/Scenes/Main.unity", "Assets/Scenes/Level1.unity" },
            locationPathName = "Builds/Windows/Game.exe",
            target = BuildTarget.StandaloneWindows64,
            options = BuildOptions.None,            // add BuildOptions.Development for a dev build
        };

        BuildReport report = BuildPipeline.BuildPlayer(options);
        BuildSummary summary = report.summary;

        if (summary.result != BuildResult.Succeeded)
            throw new System.Exception($"Build failed: {summary.totalErrors} errors");
        Debug.Log($"Build OK: {summary.totalSize} bytes in {summary.totalTime}");
    }
}

2. Headless / CI invocation

# Exit code is 0 on success; -quit ensures the editor closes; -nographics for build servers.
Unity -batchmode -quit -nographics \
  -projectPath "/path/to/Project" \
  -executeMethod BuildScript.BuildWindows \
  -logFile -
<!-- Assets/link.xml — keep types the linker can't see are used (reflection, JSON, plugins). -->
<linker>
  <assembly fullname="MyGameRuntime" preserve="all"/>
</linker>

Pitfalls

  • A scene loads in the Editor but is missing in the build — it isn't in the Build Settings

scene list (or is disabled). SceneManager.LoadScene only sees listed scenes.

  • IL2CPP build fails on a fresh machine — the platform C++ toolchain (e.g. Windows build

tools, Android NDK) isn't installed. Mono has no such requirement.

  • MissingMethodException/TypeLoadException only in the build — managed stripping removed

reflection-only code. Lower the stripping level or add a link.xml preserve entry.

  • Treating "BuildPlayer returned" as success — always check BuildReport.summary.result;

it can return with errors.

  • Addressables content is stale/missing — Addressables (com.unity.addressables) need a

*separate* content build (Build → Addressables) and a profile pointing at the right load

path; a player build alone doesn't rebuild them.

  • Shipping a Development buildBuildOptions.Development enables the profiler/debugging

and is slower; use BuildOptions.None for release.

References

  • For a complete multi-platform CI build script (target switching, version stamping,

argument parsing, exit codes) and an Addressables content-build call, read

references/ci-build-script.md.

  • Primary docs: ScriptReference/BuildPipeline.BuildPlayer, Unity Manual build sections

(player settings, managed code stripping).

  • steam-publish / itch-publish — distributing the player you just built.
  • unity-csharp-scripting — editor scripting conventions used by build scripts.

Other skills for the same job

different authors, same section of the catalogue
Modal
by christophacham
×3

Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.

17k tokens
Github Workflow Automation
by ComeOnOliver
×3

Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management

9k tokens
Gcloud
by Dicklesworthstone
×2

Google Cloud Platform CLI - manage GCP resources including Compute Engine, Cloud Run, GKE, Cloud Functions, Storage, BigQuery, and more.

2k tokens
Backend Architect
by ComeOnOliver
×2

Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and observability. Use PROACTIVELY when creating new backend services or APIs.

7k tokens
Modal
by ComeOnOliver
×2

Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.

37k tokens
Aspire
by github
vendor ×1

Aspire skill covering the Aspire CLI, AppHost orchestration, service discovery, integrations, MCP server, VS Code extension, Dev Containers, GitHub Codespaces, templates, dashboard, and deployment. Use when the user asks to create, run, debug, configure, deploy, or troubleshoot an Aspire distributed application.

21k tokens
Bigquery Pipeline Audit
by github
vendor ×1

Audits Python + BigQuery pipelines for cost safety, idempotency, and production readiness. Returns a structured report with exact patch locations.

1k tokens
Msstore CLI
by github
vendor ×1

Microsoft Store Developer CLI (msstore) for publishing Windows applications to the Microsoft Store. Use when asked to configure Store credentials, list Store apps, check submission status, publish submissions, manage package flights, set up CI/CD for Store publishing, or integrate with Partner Center. Supports Windows App SDK/WinUI, UWP, .NET MAUI, Flutter, Electron, React Native, and PWA applications.

4k tokens

How to use it

Copy the folder

Take gamedev-skills/unity-build-pipeline from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.