- Home /
How to programatically open the Build Settings menu?
This code works great: EditorApplication.ExecuteMenuItem("Edit/Render Settings");
Anyone know why these don't work? EditorApplication.ExecuteMenuItem("File/Build Settings"); EditorApplication.ExecuteMenuItem("File/Build Settings...");
Seems like this is blocked for one reason or another.
Is there any other way to open BuildSettings menu from the script?
An old question that requires an answer. Options in the File menu are not registered for EditorApplication.Execute$$anonymous$$enuItem().
either the code is not registered or it is locked for the free version
Answer by benblo · Jun 05, 2015 at 08:08 AM
EditorWindow.GetWindow(Type.GetType("UnityEditor.BuildPlayerWindow,UnityEditor"));
Event better this way since you can get it as a regular window that you can dock, instead of the usual pesky utility window thingy...
$$anonymous$$ade a few typos, and as all programmers know, typos can be dangerous or troublesome, so here is the fixed version:
EditorWindow.GetWindow(Types.GetType("UnityEditor.BuildPlayerWindow","UnityEditor"));
But otherwise, thanks for the suggestion! :-)
Uhm, there is no typo in benblo's answer. He simply used the System.Type.GetType method and privided an assembly qualified type name.
You used a static class that Unity implements which is called "Types" and that class also implements a static method called GetType which takes two parameters: "typeName" and "assemblyName". That method simply does this:
Assembly.Load(assemblyName).GetType(typeName);
So your comment is actually an alternative, not a fix.
$$anonymous$$aybe you where missing the using System
at the top? Since you probably want to avoid including the System namespace you could do:
EditorWindow.GetWindow(System.Type.GetType("UnityEditor.BuildPlayerWindow,UnityEditor"));
Ah, I see then. I was indeed not using System. Silly me! :-P
Thank you for the clarification my fellow Bunny. :-)
Your answer
![](https://koobas.hobune.stream/wayback/20220613104825im_/https://answers.unity.com/themes/thub/images/avi.jpg)