From 476719c72eb4519f725dd4ecee5cd3c6939d65c3 Mon Sep 17 00:00:00 2001 From: Robin North Date: Fri, 26 May 2023 10:02:04 +0100 Subject: [PATCH] Fix regression in 6.0.0 that broke macOS builds in Unity 2022.1+ - Closes #109 --- Editor/Build/Platform/BuildOSX.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Editor/Build/Platform/BuildOSX.cs b/Editor/Build/Platform/BuildOSX.cs index 531a234..5a1af10 100644 --- a/Editor/Build/Platform/BuildOSX.cs +++ b/Editor/Build/Platform/BuildOSX.cs @@ -106,7 +106,13 @@ private void SetBuildOutputType(string key) private void SetMacOSArchitecture(string key) { #if UNITY_STANDALONE_OSX - UnityEditor.OSXStandalone.UserBuildSettings.architecture = (UnityEditor.OSXStandalone.MacOSArchitecture)EnumValueFromKey(key); + UnityEditor.OSXStandalone.UserBuildSettings.architecture = +#if UNITY_2022_1_OR_NEWER + (UnityEditor.Build.OSArchitecture) +#else + (UnityEditor.OSXStandalone.MacOSArchitecture) +#endif + EnumValueFromKey(key); #endif } }