Skip to content

Commit a7e1be4

Browse files
authored
Update the Unity Hub mac installer to arm64 (#1328)
* Update the Unity Hub mac installer to arm64 * Update unity_installer.py
1 parent e5756e5 commit a7e1be4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gha/unity/unity_installer.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@
8686
SUPPORTED_PLATFORMS = (ANDROID, IOS, TVOS, WINDOWS, MACOS, LINUX, PLAYMODE)
8787
UNITY_VERSION_PLACEHOLDER = "unity_version_placeholder"
8888

89+
UNITY_HUB_URL_ARM_MAC = "https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup-arm64.dmg"
8990
SETTINGS = {
9091
# Used for downloading Unity Hub
9192
"unity_hub_url": {
9293
WINDOWS: "https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.exe",
94+
# Note that this is for x86 architecture. UNITY_HUB_URL_ARM_MAC above is used for arm64
9395
MACOS: "https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.dmg",
9496
LINUX: "",
9597
},
@@ -276,6 +278,9 @@ def install_unity_hub():
276278
runner_os = get_os()
277279
unity_hub_url = SETTINGS["unity_hub_url"][runner_os]
278280
if unity_hub_url:
281+
# Use the overriden version if running on a Mac arm64 machine
282+
if platform.system() == 'Darwin' and 'arm' in platform.machine().lower():
283+
unity_hub_url = UNITY_HUB_URL_ARM_MAC
279284
unity_hub_installer = path.basename(unity_hub_url)
280285
download_unity_hub(unity_hub_url, unity_hub_installer, max_attempts=MAX_ATTEMPTS)
281286
if runner_os == MACOS:

0 commit comments

Comments
 (0)