Command-line interface for Unity projects, written in Rust.
ucom provides command-line access to Unity project operations that would typically require Unity Hub or manual editor
interaction. It handles project creation, builds, tests, and Unity version management from the terminal.
- Automation - Script builds and tests for CI/CD pipelines without GUI interaction
- Speed - Build via open editor using IPC instead of waiting for batch mode startup
- Developer workflow - Cargo/dotnet-style CLI for Unity developers who prefer terminal tools
- Less Hub dependency - Manage Unity versions and projects without running Unity Hub
Requires Rust v1.85.0+
cargo install --git https://github.com/jakkovanhunen/ucomOr build from source:
git clone https://github.com/jakkovanhunen/ucom
cd ucom
cargo build --releaseucom new ~/Projects/MyGame -u 2022.3 # Create new project
ucom open # Open current project
ucom open -t ios # Open with iOS target
ucom open --upgrade # Open and upgrade to latest matching major.minor
ucom open --upgrade=6000.2 # Open and upgrade to specific version
ucom info # Show project info
ucom updates # Check for Unity updatesucom build webgl # Build for WebGL
ucom build android -d # Development build
ucom build ios --mode editor-quit # Build in editor, then quit
ucom build android --force-editor-build # Build via open editorucom test editmode # Run EditMode tests
ucom test playmode # Run PlayMode tests
ucom test android # Run on Android
ucom test playmode --categories "!Slow;UI" # Filter by categoryucom list # List installed versions
ucom list updates # Check for updates
ucom list latest # Show latest releases
ucom install 2022.3.5f1 # Install specific versionucom add builder # Add build script (required for builds)
ucom add builder-menu # Add Editor menu integration
ucom add gitignore # Add Unity .gitignore
ucom add gitattributes # Add Git LFS attributesWhen a project is open in Unity, ucom build automatically detects this and uses file-based IPC instead of launching
batch mode. This is faster and doesn't interrupt your workflow.
Requirements:
- Run
ucom add builderto install the required script
Flags:
--force-editor-build- Allow platform switching and play mode exit
webgl, android, ios, win32, win64, macos, linux64
batch- Headless, quit after build (default)batch-nogfx- Headless without graphicseditor-quit- GUI build, quit aftereditor- GUI build, stay open
-d, --development- Development build-r, --run- Run after build-S, --show- Open output folder-D, --debugging- Enable remote debugging-p, --profiling- Enable profiler-o, --output <DIR>- Custom output path-t, --type <release|debug>- Build type subdirectory
Use -O to set Unity BuildOptions:
ucom build webgl -O Development AllowDebuggingAvailable options: Development, AllowDebugging, ConnectWithProfiler, ShowBuiltPlayer, AutoRunPlayer,
CleanBuildCache, StrictMode, DetailedBuildReport, and more. See ucom help build for complete list.
editmode, playmode, webgl, android, ios, win32, win64, macos, linux64
--categories "Integration;UI" # Include categories
--categories "!Slow" # Exclude category
--tests "MyClass.MyTest" # Filter by name (regex supported)
--assemblies "MyTests.dll" # Filter by assembly-r, --show-results <all|errors|none>- Result detail level--no-batch-mode- Run with graphics (may show UI popups)-t, --target <PLATFORM>- Override build target
UCOM_EDITOR_DIR- Override Unity editor installation pathUCOM_BUILD_TARGET- Default build targetUCOM_PACKAGE_LEVEL- Package info detail level (none, no-unity, inc-unity, all)UCOM_ENABLE_CACHE- Enable/disable release data caching (default: enabled, 1-hour TTL)
Execute Unity with custom arguments:
ucom run -u 2022.3 -- -createProject ~/path/to/project -quitucom cache clear # Clear cached release data
ucom cache list # List cached filesThe build command injects UnityBuilder.cs into your project. Control this behavior with --inject:
auto(default) - Inject temporarily, remove after buildpersistent- Inject and leave in projectoff- Don't inject, fail if script missing
Most commands have short aliases:
ucom o=ucom openucom b=ucom builducom t=ucom testucom ls=ucom listucom i=ucom infoucom u=ucom updatesucom r=ucom run
- macOS and Windows only
- Unity must be in default location or set via
UCOM_EDITOR_DIR - Git required for
ucom newwith version control - iOS builds export Xcode project but don't compile it
- Editor IPC builds require
UnityBuilder.csin project
Run ucom help or ucom help <command> for detailed usage information.