I have a custom build system in place that is used from jenkins to build the game automatically for all of the platforms I want.
Through this, I can build the game for windows, linux and anything else I want with fairly customizable settings for each build. When it comes to mac builds, the only type of build I can make is a universal build for both intel x64 and apples silicon, which is BuildTarget.StandaloneOSX.
My question is how to only build for intel x64 as I’m using steam for my game and there are no apple silicon binaries for it.
I can see it’s possible to do it through the traditional build menu, I can pick intel x64, apple silicon or both/universal. So how can I do it through script.
Haha, thanks for coming back and replying with the remainder of the military secrets above. You never know who will find this in the future and go “AHA!”
Hi, I tried using this solution on Unity 2020.3.15f2 but still can’t get the Universal build… I did it the following way. Any help would be great
public class PreProcessorMacOS : IPreprocessBuildWithReport {
public int callbackOrder => throw new System.NotImplementedException();
public void OnPreprocessBuild(BuildReport report) {
EditorUserBuildSettings.SetPlatformSettings(
"OSXUniversal",
"Architecture",
"x64ARM64" );
}
}