npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

com.xmobitea.changx.mini-build

v1.5.2

Published

XmobiTea Unity Toolkit packages

Readme

XmobiTea Build

Editor-focused Unity build automation package for Android, iOS, WebGL, Windows, and MacOS.

Most behavior lives in the Editor assembly. The Runtime assembly only defines the BuildSettings asset type and the package-specific WebGLCompressionFormat enum.

AI-Focused Docs

Use these task-oriented files when you need the smallest possible context:

  • AI_SETUP.md
  • AI_SETUP_BUILD_SETTINGS.md
  • AI_BUILD_ANDROID.md
  • AI_BUILD_IOS.md
  • AI_BUILD_WEBGL.md
  • AI_BUILD_DESKTOP.md
  • AI_USAGE.md
  • AGENTS.md

Need-Based Routing

  • Need to create or update the BuildSettings asset: AI_SETUP_BUILD_SETTINGS.md
  • Need to build Android APK or AAB: AI_BUILD_ANDROID.md
  • Need to build iOS: AI_BUILD_IOS.md
  • Need to build WebGL: AI_BUILD_WEBGL.md
  • Need to build Windows or MacOS: AI_BUILD_DESKTOP.md
  • Need the short package contract: AI_USAGE.md
  • Need maintainer and agent rules: AGENTS.md

AI Quick Contract

  • Public runtime surface:
    • BuildSettings
    • WebGLCompressionFormat
  • Public editor entry points:
    • AndroidBuild
    • iOSBuild
    • WebGLBuild
    • WindowsBuild
    • MacOSBuild
    • BuildSettingsEditor.GetSettings()
    • Build.TryGetArg(...)
  • Internal shared runner:
    • Build.StartBuild(...)
  • Only enabled EditorBuildSettings.scenes are included in the build.
  • The package attempts to delete and recreate the platform output folder before each build.
  • Built-in prebuild logic only reads the command-line arg names -bundleVersion and -versionCode.
  • Missing BuildSettings logs an error during prebuild, but does not stop the subsequent build.
  • Android and iOS version fields are updated before the BuildSettings missing-asset check.
  • Android and iOS interactive build menu items do not run PreBuild().
  • WebGL interactive build does run PreBuild().

What This Package Actually Provides

  • A BuildSettings ScriptableObject that stores:
    • Android keystore fields
    • iOS automatic signing fields
    • WebGL compression and caching fields
  • A shared internal editor build runner that:
    • collects enabled scenes
    • computes the output path
    • calls BuildPipeline.BuildPlayer(...)
  • Platform-specific editor helpers with menu items and scriptable static methods
  • A custom inspector plus XmobiTea Tools/Build/Open Settings helper that auto-creates the settings asset if needed

Runtime vs Editor Surface

Runtime assembly

Namespace:

using XmobiTea.MiniBuild;

Types:

  • BuildSettings
  • WebGLCompressionFormat

There is no gameplay/runtime build pipeline logic in the runtime assembly.

Editor assembly

Namespace:

using XmobiTea.MiniBuild.Editor;

Primary entry points:

  • AndroidBuild.PreBuild()
  • AndroidBuild.Build()
  • AndroidBuild.AabBuild()
  • iOSBuild.PreBuild()
  • iOSBuild.Build()
  • WebGLBuild.PreBuild()
  • WebGLBuild.Build()
  • WindowsBuild.Build()
  • MacOSBuild.Build()
  • BuildSettingsEditor.GetSettings()
  • Build.TryGetArg(...)

Implementation detail:

  • Build.StartBuild(...) is internal, not part of the public package API for consumers in other assemblies.

Shared Build Flow

Build.StartBuild(...) is the internal runner used by all platform build classes.

Actual behavior:

  1. It tries to delete the platform subfolder such as Build/Android/.
  2. It tries to recreate that subfolder.
  3. If folder cleanup throws, it logs the exception and still continues.
  4. It includes only enabled scenes from EditorBuildSettings.scenes.
  5. It builds to subPath + name.
  6. It returns true only when BuildPipeline.BuildPlayer(...) reports Succeeded.

Important consequences:

  • Output under Build/... is treated as disposable.
  • Disabled scenes are skipped automatically.
  • Folder cleanup is best effort, not a hard guardrail.

Platform Behavior

Android

Menus:

XmobiTea Tools/Build/Pre Build/Android
XmobiTea Tools/Build/Build/Android .apk
XmobiTea Tools/Build/Build/Android .aab

Static methods:

  • AndroidBuild.PreBuild()
  • AndroidBuild.Build()
  • AndroidBuild.AabBuild()

PreBuild() behavior:

  • reads -bundleVersion and sets PlayerSettings.bundleVersion when present
  • reads -versionCode and parses it as int for PlayerSettings.Android.bundleVersionCode
  • increments PlayerSettings.Android.bundleVersionCode by 1 when -versionCode is absent
  • loads BuildSettings from Resources.Load<BuildSettings>(BuildSettings.ResourcesPath)
  • if settings are missing, logs an error and returns without applying keystore fields
  • version fields are updated before BuildSettings is loaded, so a missing settings asset does not undo earlier version changes
  • if settings exist, applies:
    • useCustomKeystore
    • keystoreName
    • keystorePass
    • keyaliasName
    • keyaliasPass

Build method behavior:

  • AndroidBuild.Build() sets EditorUserBuildSettings.buildAppBundle = false and runs PreBuild() first
  • AndroidBuild.AabBuild() sets EditorUserBuildSettings.buildAppBundle = true and runs PreBuild() first
  • XmobiTea Tools/Build/Build/Android .apk does not run PreBuild()
  • XmobiTea Tools/Build/Build/Android .aab does not run PreBuild()
  • supported Unity versions for this package use EditorUserBuildSettings.androidCreateSymbols = AndroidCreateSymbols.Public during the build, then restore the previous value

Outputs:

  • APK -> Build/Android/build.apk
  • AAB -> Build/Android/build.aab

Practical consequence:

  • If you use the Android build menu items directly, the build uses whatever Android PlayerSettings are already in memory unless you ran Pre Build/Android first.

iOS

Menus:

XmobiTea Tools/Build/Pre Build/iOS
XmobiTea Tools/Build/Build/iOS

Static methods:

  • iOSBuild.PreBuild()
  • iOSBuild.Build()

PreBuild() behavior:

  • reads -bundleVersion and sets PlayerSettings.bundleVersion when present
  • reads -versionCode and writes it directly to PlayerSettings.iOS.buildNumber when present
  • otherwise increments PlayerSettings.iOS.buildNumber by parsing it as int
  • loads BuildSettings
  • if settings are missing, logs an error and returns without applying signing fields
  • version fields are updated before BuildSettings is loaded, so a missing settings asset does not undo earlier version changes
  • if settings exist, applies:
    • appleEnableAutomaticSigning
    • appleDeveloperTeamID

Build method behavior:

  • iOSBuild.Build() runs PreBuild() first
  • XmobiTea Tools/Build/Build/iOS does not run PreBuild()

Output:

  • Xcode project -> Build/iOS/build

Practical consequences:

  • Interactive iOS builds do not refresh signing or version fields unless you ran Pre Build/iOS first.
  • Automatic increment requires the current PlayerSettings.iOS.buildNumber to be numeric.

WebGL

Menus:

XmobiTea Tools/Build/Pre Build/WebGL
XmobiTea Tools/Build/Build/WebGL

Static methods:

  • WebGLBuild.PreBuild()
  • WebGLBuild.Build()

PreBuild() behavior:

  • loads BuildSettings
  • if settings are missing, logs an error and returns without applying WebGL settings
  • if settings exist, applies:
    • PlayerSettings.WebGL.dataCaching
    • PlayerSettings.WebGL.compressionFormat
    • PlayerSettings.WebGL.decompressionFallback

Build method behavior:

  • WebGLBuild.Build() runs PreBuild() first
  • XmobiTea Tools/Build/Build/WebGL calls Build(), so the menu build also runs PreBuild()

Output:

  • Build/WebGL/build

Windows

Menu:

XmobiTea Tools/Build/Build/Windows

Static method:

  • WindowsBuild.Build()

Behavior:

  • does not use BuildSettings
  • does not have a separate prebuild step
  • builds directly through the shared runner

Output:

  • Build/Windows/build.exe

MacOS

Menu:

XmobiTea Tools/Build/Build/MacOS

Static method:

  • MacOSBuild.Build()

Behavior:

  • does not use BuildSettings
  • does not have a separate prebuild step
  • builds directly through the shared runner

Output:

  • Build/MacOS/build.app

BuildSettings Asset

BuildSettings is defined in the runtime assembly and loaded with:

Resources.Load<BuildSettings>(BuildSettings.ResourcesPath)

The constant path is:

XmobiTea BuildSettings

That means the asset must be named XmobiTea BuildSettings.asset and live directly inside a Resources folder. Assets/Resources/XmobiTea BuildSettings.asset is valid; Assets/Resources/Build/XmobiTea BuildSettings.asset is not, because the load path has no subfolder segment.

Package helpers:

  • XmobiTea Tools/Build/Open Settings loads or auto-creates the asset
  • auto-created path: Assets/Resources/XmobiTea BuildSettings.asset
  • create menu path: XmobiTea Config/Build Settings

BuildSettings exposes read-only public properties backed by private serialized fields:

  • Android:
    • useAndroidKeystore reads _useAndroidKeystore
    • keystoreName reads _keystoreName
    • keystorePass reads _keystorePass
    • keyaliasName reads _keyaliasName
    • keyaliasPass reads _keyaliasPass
  • iOS:
    • appleEnableAutomaticSigning reads _appleEnableAutomaticSigning
    • appleDeveloperTeamID reads _appleDeveloperTeamID
  • WebGL:
    • compressionFormat reads _compressionFormat
    • dataCaching reads _dataCaching
    • decompressionFallback reads _decompressionFallback

Use the custom inspector, SerializedObject, or the serialized backing field names when editing the asset programmatically; the public properties do not have setters.

Recommended Workflows

Headless or scripted build

Use the static build methods because they trigger the package prebuild logic where applicable.

using XmobiTea.MiniBuild.Editor;

public static class BuildEntry
{
    public static void BuildAndroidApk()
    {
        AndroidBuild.Build();
    }

    public static void BuildAndroidAab()
    {
        AndroidBuild.AabBuild();
    }

    public static void BuildIos()
    {
        iOSBuild.Build();
    }

    public static void BuildWebGl()
    {
        WebGLBuild.Build();
    }
}

Interactive menu build for Android or iOS

If you need the package to refresh signing/version settings first:

  1. Run the matching Pre Build/... menu item.
  2. Run the matching Build/... menu item.

If you skip the prebuild menu, the build still runs, but it uses the current PlayerSettings values as-is.

Command-Line Args Used By Built-In Flows

Built-in Android and iOS prebuild logic only reads:

  • -bundleVersion
  • -versionCode

Notes:

  • Build.TryGetArg(...) itself is generic and can search any arg name.
  • Android parses -versionCode as int, so non-numeric values will throw.
  • iOS writes -versionCode directly to PlayerSettings.iOS.buildNumber.

Do / Don't

Do

  • Do treat this as an editor automation package with a small data-only runtime surface.
  • Do keep enabled scenes in EditorBuildSettings accurate before building.
  • Do treat Build/... outputs as disposable.
  • Do use BuildSettingsEditor.GetSettings() or Open Settings when you need the settings asset.
  • Do run PreBuild() explicitly before Android/iOS menu builds if you want package-managed versioning or signing updates.

Don't

  • Don't describe this package as pure runtime functionality.
  • Don't assume Android/iOS build menu items call PreBuild() for you.
  • Don't assume missing BuildSettings stops Android/iOS/WebGL builds.
  • Don't assume Windows/MacOS build flow reads BuildSettings.
  • Don't assume disabled scenes are included.

Common Mistakes

Mistake 1: Expecting Android/iOS menu builds to refresh settings

The Android .apk, Android .aab, and iOS menu build commands skip PreBuild().

Mistake 2: Treating BuildSettings as a hard build requirement

The prebuild step logs an error when the asset is missing, but the actual build method still proceeds.

Mistake 3: Forgetting the output folder is disposable

The package tries to delete and recreate the platform folder under Build/... before each build.

Mistake 4: Expecting all project scenes to build

Only enabled EditorBuildSettings.scenes are included.

Mistake 5: Using a non-numeric Android -versionCode

Android parses that value with int.Parse(...).

Mistake 6: Leaving a non-numeric iOS build number before auto-increment

The iOS auto-increment path parses the existing PlayerSettings.iOS.buildNumber as int.

Package Metadata

  • Package name: com.xmobitea.changx.mini-build
  • Version: 1.5.2
  • Unity version: 2022.3+
  • Dependency: com.xmobitea.changx.app
  • License: Apache-2.0