Skip to content
Skillpedia
General coding6.6k Β· #13845

unity-build-pipeline

What it does

This skill guides the agent to package a Unity game into a playable build for a chosen platform. It is for developers preparing games for testing or release.

When to use it

  • βœ“When you are setting up which scenes are included in a Unity build.
  • βœ“When you want to choose between the Mono and IL2CPP scripting backends or reduce build size.
  • βœ“When you need to run Unity builds automatically from a script or a CI system.

Skill link

https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/unity/unity-build-pipeline/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/unity/unity-build-pipeline/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œHelp me make a Windows build of my Unity game that includes only the scenes I actually use.”

5 new skills a week. 1 minute to read.

How it works

It explains how to set up the scene list and platform target, choose a scripting backend and stripping options, and script the build so it can run without opening the editor.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Unity Build Pipeline

Configure, script, and automate Unity 6.3 LTS player builds: scenes, platform target, scripting backend, stripping, and headless/CI builds. Targets Unity 6.3 LTS (6000.3).

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

  1. List the scenes to build (File β†’ Build Profiles β†’ Scene List, or EditorBuildSettings.scenes). Only listed, enabled scenes ship; scene 0 is the start scene. A Build Profile asset can carry its own Scene List (Add Settings β†’ Scene List); when it does, that profile builds its list, not the global one.
  2. Pick the platform target and switch the active build target if needed (BuildTarget / EditorUserBuildSettings). In batch mode, pass -buildTarget <name> on the command line instead: SwitchActiveBuildTarget is not available there.
  3. 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. (Forward note: Unity is developing a CoreCLR backend as a modern .NET runtime successor to Mono, but in the Unity 6.7 beta it is still experimental, desktop-only, and documented as not suitable for production β€” so for 6.3 LTS the choice stays Mono vs IL2CPP.)
  4. 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.
  5. Script the build with BuildPipeline.BuildPlayer(BuildPlayerOptions) and inspect the returned BuildReport β€” a non-Succeeded result must fail your pipeline.
  6. Run headless for CI with -batchmode -quit -executeMethod, and check the exit code.
  7. 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.
# -buildTarget makes the Editor start on that platform, so scripts compile with its defines.
Unity -batchmode -quit -nographics \
  -projectPath "/path/to/Project" \
  -buildTarget win64 \
  -executeMethod BuildScript.BuildWindows \
  -logFile -

3. Build a saved Build Profile

using UnityEditor;
using UnityEditor.Build.Profile;
using UnityEditor.Build.Reporting;

public static class ProfileBuild
{
    [MenuItem("Build/Windows Release Profile")]
    public static void Build()
    {
        var profile = AssetDatabase.LoadAssetAtPath<BuildProfile>(
            "Assets/Settings/Build Profiles/WindowsRelease.asset");
        var options = new BuildPlayerWithProfileOptions
        {
            buildProfile = profile,                 // platform, scene list, defines from the asset
            locationPathName = "Builds/Windows/Game.exe",
            options = BuildOptions.None,
        };
 
FAQ

What is IL2CPP?

IL2CPP is one of the two scripting backends in Unity, and the skill compares it with Mono.

Does this publish my game to a store?

No. Store submission is covered by separate skills.

Does this cover console certification?

No. Console certification details are platform-specific and outside this skill.

Details

Original description by the author

Build and ship Unity 6.3 LTS players: build settings and scenes, player/quality settings, the 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.

repo: gamedev-skills/awesome-gamedev-agent-skills

Popularity

GitHub stars
6.6k
Ranking position
#13845
License
Apache-2.0
Updated
10/28/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills