game build
Export game, sync files, and build Flutter app in one command. Perfect for streamlining your development workflow.
Usage
game build <platform> --engine <engine> [options]Arguments
<platform>- Target platform:android,ios,macos,windows,linux
Options
| Option | Description | Default |
|---|---|---|
--engine, -e | Engine to build: unity or unreal | (required) |
--development, -d | Development build | false |
--release | Release build | true |
--skip-export | Skip game export step | false |
--skip-sync | Skip file sync step | false |
--config, -c | Path to .game.yml | auto-detect |
Examples
Full Build Pipeline
# Build Android with Unity
game build android --engine unity
# Build iOS with Unreal
game build ios --engine unreal
# Development build
game build android --engine unity --developmentSkip Steps
# Skip export if already done
game build android --engine unity --skip-export
# Skip sync if files are current
game build android --engine unity --skip-sync
# Only build Flutter (skip both)
game build android --engine unity --skip-export --skip-syncWhat It Does
The build command performs three steps:
-
Export (unless
--skip-export)- Runs
game export <engine> --platform <platform> - Builds game from Unity/Unreal
- Runs
-
Sync (unless
--skip-sync)- Runs
game sync <engine> --platform <platform> - Copies exported files to Flutter project
- Runs
-
Build
- Runs
flutter build <platform> - Creates final Flutter application
- Runs
This single command replaces three separate commands - perfect for rapid iteration!
Build Targets
Android
game build android --engine unityCreates: build/app/outputs/flutter-apk/app-release.apk
iOS
game build ios --engine unityCreates: build/ios/iphoneos/Runner.app
iOS builds require macOS and Xcode.
Desktop Platforms
# macOS
game build macos --engine unity
# Windows
game build windows --engine unity
# Linux
game build linux --engine unityDevelopment vs Release
Development Build
game build android --engine unity --developmentCharacteristics:
- Faster build times
- Debug symbols included
- Larger file size
- Better error messages
Release Build (Default)
game build android --engine unity --releaseCharacteristics:
- Optimized for performance
- Smaller file size
- Code obfuscation
- Production-ready
Configuration
Configure in .game.yml:
engines:
unity:
project_path: ../MyUnityProject
export_path: ../MyUnityProject/Exports
export_settings:
development: false
build_configuration: Release
platforms:
android:
enabled: true
target_path: android/unityLibraryWorkflow Examples
Daily Development
# Make changes in Unity
# ...
# Build and test
game build android --engine unity
flutter installMulti-Platform Build
# Build for all platforms
game build android --engine unity
game build ios --engine unity
game build macos --engine unityIncremental Builds
# First build (full pipeline)
game build android --engine unity
# Subsequent builds (skip export if no game changes)
game build android --engine unity --skip-exportPerformance Tips
Skip Unnecessary Steps
If you haven't changed the game:
game build android --engine unity --skip-export --skip-syncThis only runs flutter build which is much faster.
Use Development Builds
During development:
game build android --engine unity --developmentDevelopment builds are faster than release builds.
Cache Exports
Don't clean export directories unnecessarily - engines cache build artifacts for faster subsequent exports.
Troubleshooting
Build Failed
Check each step individually:
# Test export
game export unity --platform android
# Test sync
game sync unity --platform android
# Test Flutter build
flutter build apkStale Files
Use clean sync:
# First, manually clean
game sync unity --platform android --clean
# Then build
game build android --engine unity --skip-exportConfiguration Issues
Validate configuration:
game config validateRelated Commands
game export- Export game onlygame sync- Sync files onlygame config- Manage configuration
Next Steps
After building:
- Test on device -
flutter install - Run app -
flutter run --release - Publish - Deploy to app stores or use
game publish
Build complete? Test with flutter install or deploy to app stores!