pattern: "*" include: true cancel_previous_builds: false scripts: 3f1 UNITY_VERSION_CHANGESET: af2e63e8f9bd BUILD_SCRIPT: BuildAndroid PACKAGE_NAME: "io.codemagic.unity" # <- Put your package name here e.g. unity # <- (Includes UNITY_HOME, UNITY_SERIAL, UNITY_EMAIL and UNITY_PASSWORD) vars: # Add the group environment variables in Codemagic UI (either in Application/Team variables). Name: Unity Install Older Version Workflow max_build_duration: 120 instance_type: windows_x2 environment: name: Deactivate Unity License script: $UNITY_HOME/Contents/MacOS/Unity -batchmode -quit -returnlicense -nographics executeMethod BuildScript.$BUILD_SCRIPT -nographics -buildTarget Android artifacts: name: Set build number and export Unity script: | export NEW_BUILD_NUMBER=$(($(google-play get-latest-build-number -package-name "$PACKAGE_NAME" -tracks=alpha) + 1)) $UNITY_HOME/Contents/MacOS/Unity -batchmode -quit -logFile -projectPath. name: Activate Unity License script: | $UNITY_HOME/Contents/MacOS/Unity -batchmode -quit -logFile -serial $ -m android android-sdk-ndk-tools android-open-jdk pattern: develop include: true source: true scripts: 38f1 UNITY_VERSION_CHANGESET: fdbb7325fa47 BUILD_SCRIPT: BuildAndroid PACKAGE_NAME: "io.codemagic.unity" # <- Put your package name here e.g. google_play # <- (Includes GCLOUD_SERVICE_ACCOUNT_CREDENTIALS <- Put your google-services.json) vars: unity # <- (Includes UNITY_HOME, UNITY_SERIAL, UNITY_EMAIL and UNITY_PASSWORD) # Add the group environment variables in Codemagic UI (in Application or Team variables). Name: Unity Android Workflow instance_type: mac_pro max_build_duration: 120 environment: The example below uses Unity Hub CLI commands to install the specified Unity version as well as the Android and iOS Build Support modules. Unity installation scriptĪfter activating the Unity license as usual, add the following script to install the desired version and modules you wish to use. Unity Hub CLI commands do not work correctly if a license is not already active on the machine. name: Retrieve Used Unity Version script: | $env:UNITY_VERSION=(Get-Content ProjectSettings/ProjectVersion.txt -TotalCount 1).Substring(17) $env:UNITY_VERSION_CHANGESET=( "\((.*)\)").match((Get-Content ProjectSettings/ProjectVersion.txt -TotalCount 2)).groups.value Add-Content -Path $env:CM_ENV -Value "UNITY_VERSION=$UNITY_VERSION" Add-Content -Path $env:CM_ENV -Value "UNITY_VERSION_CHANGESET=$UNITY_VERSION_CHANGESET" Add-Content -Path $env:CM_ENV -Value "UNITY_HOME=C:\Program Files\Unity\Hub\Editor\$env:UNITY_VERSION\Editor" Activating UnityĮven though you are installing a different version of Unity to build your apps with, you should activate your license using the default Unity version already installed on the machine. In order to install a different version, you can use the info from the ProjectSettings/ProjectVersion.txt file which has the unity version and changeset that the project uses. Getting the Unity version number and changeset id License activation and return takes place with the Unity version already installed on the machine, but building of the Xcode project or Android binary will use the version of Unity you install. It is possible to use the Unity Hub CLI to download and install a different Unity Editor version and target support files for that version. If your app requires additional modules then you need to install it using Unity Hub CLI like this: /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub -headless install-modules -version -m windows-mono, this will install the windows modules for the specified.Mac machines with Apple silicon support Unity built for x86_64 architecture.These versions are the Unity Editor (macOS x86_64), and have only the macOS, Android, and iOS modules.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |