CLI ReferenceCommands
game export
Export/package your Unity or Unreal Engine game for specified platforms.
Usage
game export <engine> --platform <platform> [options]Arguments
<engine>- Engine type:unityorunreal
Options
| Option | Description | Default |
|---|---|---|
--platform, -p | Target platform(s) | (required) |
--all | Export all enabled platforms | false |
--development, -d | Development build | false |
--config, -c | Path to .game.yml | auto-detect |
Supported Platforms
android- Android APK/AABios- iOS frameworkmacos- macOS app bundlewindows- Windows executablelinux- Linux executable
Examples
Export Unity
# Export for Android
game export unity --platform android
# Export for iOS (macOS only)
game export unity --platform ios
# Export for multiple platforms
game export unity --platform android,ios
# Export all enabled platforms
game export unity --all
# Development build
game export unity --platform android --developmentExport Unreal
# Export for Android
game export unreal --platform android
# Export for iOS
game export unreal --platform ios
# Export with custom config
game export unreal --platform android --config /path/to/.game.ymlWhat It Does
The export command:
- Validates Configuration - Checks
.game.ymlfor correct paths and settings - Locates Engine - Finds Unity/Unreal installation
- Triggers Build - Runs engine build/package process in batch mode
- Saves Output - Exports to configured export path
Unity Export Process
Unity -quit -batchmode \
-projectPath /path/to/project \
-buildTarget Android \
-executeMethod BuildScript.BuildUnreal Export Process
/path/to/UE/Engine/Build/BatchFiles/RunUAT.sh \
BuildCookRun \
-project=/path/to/project.uproject \
-platform=Android \
-cook -stage -archiveConfiguration (.game.yml)
Configure export settings in your .game.yml:
engines:
unity:
project_path: ../MyUnityProject
export_path: ../MyUnityProject/Exports
export_settings:
development: false
build_configuration: Release
scenes:
- MainMenu
- Gameplay
platforms:
android:
enabled: true
build_settings:
export_project: true
scripting_backend: IL2CPP
target_architectures: [ARM64]
ios:
enabled: true
build_settings:
symlink_libraries: trueExport Settings
Unity Settings
development- Enable development buildbuild_configuration- Release, Debugscenes- List of scenes to includescripting_backend- Mono, IL2CPPtarget_architectures- ARM64, ARMv7
Unreal Settings
development- Enable development buildbuild_configuration- Shipping, Development, Debuglevels- List of levels to includearchitecture- ARM64, x64package_data_in_apk- true/false
Platform-Specific Notes
Android
Requirements:
- Android SDK & NDK installed
- Unity: API level 22+, ARM64 recommended
- Unreal: API level 22+, ARM64 required
Export Output:
- Unity:
unityLibraryfolder - Unreal: APK with native libraries
iOS
Requirements:
- macOS with Xcode
- Unity: iOS 12.0+
- Unreal: iOS 12.0+
Export Output:
- Unity:
UnityFramework.framework - Unreal:
UnrealFramework.framework
iOS builds can only be performed on macOS systems.
Desktop Platforms
macOS:
- Requires macOS system
- Exports
.appbundle or framework
Windows:
- Requires Windows or Wine
- Exports executable and DLLs
Linux:
- Exports executable and shared libraries
Troubleshooting
Unity Not Found
Error: Unity Editor not found
Solutions:
- Install Unity in standard location
- Add Unity to PATH
- Specify Unity path in
.game.yml:
engines:
unity:
unity_path: /Applications/Unity/Hub/Editor/2022.3.0f1/Unity.appExport Failed
Error: Unity build failed or Unreal package failed
Solutions:
- Check project compiles - Fix errors in Unity/Unreal Editor first
- Verify scenes/levels - Ensure all are included in build settings
- Check platform support - Install target platform in Unity Hub/Unreal
- Review console output - Check detailed error messages
Path Not Found
Error: Project path not found
Solutions:
- Verify
project_pathin.game.ymlis correct - Use relative paths:
../MyUnityProject - Check spelling and case sensitivity
Missing Build Support
Error: Android build support not installed
Solutions:
- Open Unity Hub → Installs → Add Modules
- Select Android Build Support (or target platform)
- Wait for installation to complete
Performance Tips
First Export
The first export may take several minutes as the engine:
- Compiles all scripts
- Processes assets
- Generates platform-specific data
Subsequent Exports
Later exports are faster due to caching:
- Only changed assets are reprocessed
- Scripts are incrementally compiled
- Build cache is reused
Optimize Export Time
- Clean project - Remove unnecessary assets
- Disable unused platforms - Only enable what you need
- Use development builds - Faster for testing
- Cache builds - Don't clean export directory unnecessarily
Related Commands
game sync- Sync exported files to Fluttergame build- Export + sync + build Flutter appgame config- View/validate configuration
Next Steps
After exporting:
- Sync files to Flutter with
game sync - Run your Flutter app with
flutter run - Build for release with
game build
Export successful? Run game sync to copy the files to your Flutter project!