unity plugin
Getting Started
This project is a fastlane plugin. To get started with fastlane-plugin-unity
, add it to your project by running:
fastlane add_plugin unity
About unity
Execute unity in command line from fastlane
unity(
build_target: "Android",
execute_method: "ClassName.MethodName",
extra_args: "-arg1 -arg2"
)
This plugin determine path to Unity executable in the following order
-
unity_path
option - Path used in Unity docker image
- Default path in Unity Hub with
unity_version
option - Default path of standalone installation
Supported options
Name Env Var Name |
Description | Default |
---|---|---|
unity_path FL_UNITY_PATH |
Path to Unity executable | |
unity_version FL_UNITY_VERSION |
Unity version to execute | |
project_path FL_UNITY_PROJECT_PATH |
Path to Unity project | Current Dir |
batchmode FL_UNITY_BATCHMODE |
Run command in batch mode | true |
nographics FL_UNITY_NOGRAPHICS |
Do not initialize the graphics device | true |
quit FL_UNITY_QUIT |
Quit the Unity after command execution | true |
username FL_UNITY_USERNAME |
Username to log in | |
password FL_UNITY_PASSWORD |
Password to log in | |
build_target FL_UNITY_BUILD_TARGET |
Active build target like "iOS" or "Android" | |
execute_method FL_UNITY_EXECUTE_METHOD |
Static method to execute | |
enable_cache_server FL_UNITY_ENABLE_CACHE_SERVER |
Enable usage of Accelerator Cache Server | |
cache_server_endpoint FL_UNITY_CACHE_SERVER_ENDPOINT |
Endpoint address of Accelerator Cache Server | |
cache_server_namespace_prefix FL_UNITY_CACHE_SERVER_NAMESPACE_PREFIX |
Namespace prefix for Accelerator Cache Server | |
cache_server_enable_download FL_UNITY_CACHE_SERVER_ENABLE_DOWNLOAD |
Enable downloading from Accelerator Cache Server | |
cache_server_enable_upload FL_UNITY_CACHE_SERVER_ENABLE_UPLOAD |
Enable uploading to Accelerator Cache Server | |
extra_args FL_UNITY_EXTRA_ARGS |
Extra arguments |
See manual for detailed descriptions and other options: https://docs.unity3d.com/Manual/CommandLineArguments.html
Example
Check out the example Fastfile
to see how to use this plugin. Try it by cloning the repo, running fastlane install_plugins
and bundle exec fastlane test
.
Run tests for this plugin
To run both the tests, and code style validation, run
rake
To automatically fix many of the styling issues, use
rubocop -a
Issues and Feedback
For any other issues and feedback about this plugin, please submit it to this repository.
Troubleshooting
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
Using fastlane Plugins
For more information about how the fastlane
plugin system works, check out the Plugins documentation.
About fastlane
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.