Hi,
Could you please tell me, how to set up Bitrise for building iOS application with Unity on PC with Windows?
I have found this: How to build a Unity project, but I fear it is outdated.
Thanks in advance for any help.
Hi,
Could you please tell me, how to set up Bitrise for building iOS application with Unity on PC with Windows?
I have found this: How to build a Unity project, but I fear it is outdated.
Thanks in advance for any help.
The workflow will differ by requirements but here is an example I have used in the past
---
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: other
workflows:
primary:
steps:
- script@1:
title: Download and Install Unity
run_if: ".IsCI"
inputs:
- content: |
#!/usr/bin/env bash
set -ex
#download unity pkg
curl -o ./unity.pkg http://download.unity3d.com/download_unity/38b4efef76f0/MacEditorInstaller/Unity-5.5.0f3.pkg
#download android support platform
curl -o ./android.pkg http://download.unity3d.com/download_unity/38b4efef76f0/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-5.5.0f3.pkg
#download iOS android support
curl -o ./ios.pkg http://download.unity3d.com/download_unity/38b4efef76f0/MacEditorTargetInstaller/UnitySetup-iOS-Support-for-Editor-5.5.0f3.pkg
#install unity pkg
sudo -S installer -package ./unity.pkg -target / -verbose
#install unity android support pkg
sudo -S installer -package ./android.pkg -target / -verbose
#install unity iOS support pkg
sudo -S installer -package ./ios.pkg -target / -verbose
- script@1:
title: Activate Unity
run_if: ".IsCI"
inputs:
- content: |
#!/usr/bin/env bash
set -ex
/Applications/Unity/Unity.app/Contents/MacOS/Unity -logfile - &
sleep 15
sudo killall Unity
/Applications/Unity/Unity.app/Contents/MacOS/Unity \
-quit -noUpm -batchmode -logFile - \
-serial ${UNITY_SERIAL} \
-username ${UNITY_EMAIL} \
-password ${UNITY_PW}
- script@1:
title: Build Android
inputs:
- content: |-
#!/bin/bash
# fail if any commands fails
set -ex
/Applications/Unity/Unity.app/Contents/MacOS/Unity -nographics -quit -batchmode -logFile -projectPath "$BITRISE_SOURCE_DIR" -executeMethod BitriseUnity.Build -androidSdkPath "$ANDROID_HOME" -buildOutput "$BITRISE_DEPLOY_DIR/mygame.apk" -buildPlatform android
- script@1:
title: Build iOS
inputs:
- content: |-
#!/bin/bash
# fail if any commands fails
set -ex
/Applications/Unity/Unity.app/Contents/MacOS/Unity -nographics -quit -batchmode -logFile -projectPath "$BITRISE_SOURCE_DIR" -executeMethod BitriseUnity.Build -buildOutput "$BITRISE_SOURCE_DIR/xcodebuild" -buildPlatform ios
- script@1:
title: Return Unity license
is_always_run: true
run_if: ".IsCI"
inputs:
- content: |-
#!/usr/bin/env bash
set -ex
/Applications/Unity/Unity.app/Contents/MacOS/Unity \
-quit -noUpm -batchmode -logFile - \
-returnlicense
meta:
bitrise.io:
stack: osx-xcode-13.4.x
machine_type_id: g2.4core
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.