Building xcode project through editor script

Is it currently possible to specify through an editor script, not the build settings window, whether the editor should build a standalone app or an xcode project?

We are unable to find any documentation regarding this and we want to be able to set this up for our build machines without having to remote control in to them each separately just to set one flag in the build settings window. We tried looking through the editor source on github, but we were not able to find anything.

Edit: I botched the title a little bit…

1 Like

Try this:

EditorUserBuildSettings.SetPlatformSettings("OSXUniversal", "CreateXcodeProject", true.ToString());
EditorUserBuildSettings.SetPlatformSettings("OSXUniversal", "CreateXcodeProject", false.ToString());

Looks like we weren’t actually exposing a better API :(. This will be easier in Unity 2020.2:

UnityEditor.OSXStandalone.UserBuildSettings.createXcodeProject = true;
2 Likes

Can confirm that this works. Glad to hear a better API is on its way.
Thank you very much!