unity-build-pipeline-sh-k4ji2a
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 "unity-build-pipeline-sh-k4ji2a" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-7a0a91207fd7e357f1244ad5a8dce8044ba6405920004bcce39d56e45dab66a6. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/unity-build-pipeline-sh-k4ji2a 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
Unity Build Pipeline (SH-K4JI2A): A skill module dedicated to the UnityBuild pipeline, intended to help AI agents efficiently perform tasks related to that pipeline.
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`.
- Testing
- Not tested
Browse files
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.assetor 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 returnedBuildReport— a non-Succeededresult 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 -
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.LoadSceneonly 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/TypeLoadExceptiononly in the build — managed stripping removed reflection-only code. Lower the stripping level or add alink.xmlpreserve 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.Developmentenables the profiler/debugging and is slower; useBuildOptions.Nonefor 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
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 面向 Unity 6 构建流水线的高价值专业工具,解决游戏开发中的高频刚需场景
- 提供完整工作流、代码示例和陷阱提示,显著提升 CI/CD 和多平台构建效率
Highlights
- 触发描述清晰完整,When to use 章节明确界定适用与不适用场景
- 边界清晰,覆盖 Build Settings、CI/headless 构建等多种变体
Highlights
- Core workflow 七步法结构清晰,包含端到端 C#/bash/XML 示例
- frontmatter 完整,Pitfalls 和 References 增强实用性
Highlights
- 基于 Unity 官方 BuildPipeline API,参数使用规范
- 覆盖 BuildReport 检查、IL2CPP 工具链、代码裁剪等关键异常场景
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
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.