unitybuild

UnityBuild: A UnityBuild pipeline tool that helps AI Agents automate project builds.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "unitybuild" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-94c753366fbd22e8c5941018df68f71ef3f0fff80159bc70e3e9bcfa498fa97f. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/unity-build-pipeline-luq8 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

UnityBuild: A UnityBuild pipeline tool that helps AI Agents automate project builds.

0 Downloads

Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference

SkillPi interpretation

Tasks
Configure, script, and automate Unity 6 player builds: scenes, platform target, scripting backend, stripping, and headless/CI builds. Targets **Unity 6 (6000.0 LTS)**.
Audience
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`.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: UnityBuild流水线
slug: unity-build-pipeline
version: 1.0.0
displayName: UnityBuild流水线
description: >
  UnityBuild流水线工具,帮助AI Agent自动化构建项目。
summary: "UnityBuild流水线工具,帮助AI Agent自动化构建项目。"
license: Apache-2.0
category: 游戏开发
framework:
  - Claude Code
  - Codex
  - Hermes Agent
  - OpenClaw
  - QClaw
  - WorkBuddy
platform: multi-platform
homepage: https://github.com/1991513ccie-png
repository: https://github.com/1991513ccie-png

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

  1. 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.
  2. Pick the platform target and switch the active build target if needed (BuildTarget / EditorUserBuildSettings).
  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.
  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.
Unity -batchmode -quit -nographics \
  -projectPath "/path/to/Project" \
  -executeMethod BuildScript.BuildWindows \
  -logFile -

3. Protect stripped code with link.xml

<!-- 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 build — BuildOptions.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).

Related skills

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

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 面向 Unity 6 游戏开发者的自动化构建需求,提供完整工作流和 CI 集成方案
  • 解决实际工程痛点(平台切换、脚本后端选择、构建验证等)
Trigger Precision90/100

Highlights

  • description 完整描述核心功能,When to use 明确适用/不适用边界
  • 覆盖 Unity 构建关键场景,触发词精准完整
Structure and Standards95/100

Areas to improve

  • When to Use 章节标题缺失 Reported severity: Minor

    内容已存在但未使用显式二级标题

    Recommendation: 建议添加 '## When to Use' 二级标题以提升结构清晰度

Highlights

  • Core workflow 7 步骤清晰,含端到端代码示例和 Pitfalls 说明
  • frontmatter 完整,文档结构优秀
Execution Reliability75/100

Areas to improve

  • 引用文件缺失 Reported severity: Major

    SKILL.md 引用了 references/ci-build-script.md 但未传入该文件

    Recommendation: 请补充 references/ci-build-script.md 文件或移除相关引用

Highlights

  • 工具来源明确(Unity 官方 API),参数示例正确
  • 覆盖主要异常场景(BuildReport 检查、IL2CPP 工具链、stripping 问题)
Evidence Verifiability (mean of the first four)86/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.