Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by Aubrey-Falconer · Feb 17, 2011 at 05:17 AM · editor-scriptingeditorgui

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...");

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image equalsequals · Aug 16, 2012 at 03:55 PM 0
Share

Seems like this is blocked for one reason or another.

avatar image tak3r · Feb 26, 2013 at 05:05 AM 0
Share

Is there any other way to open BuildSettings menu from the script?

avatar image unimechanic ♦♦ · Mar 01, 2013 at 09:13 PM 1
Share

An old question that requires an answer. Options in the File menu are not registered for EditorApplication.Execute$$anonymous$$enuItem().

avatar image BlackWingsCorp · Mar 01, 2013 at 09:54 PM 0
Share

either the code is not registered or it is locked for the free version

1 Reply

· Add your reply
  • Sort: 
avatar image
5

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...

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TonanBora · May 25, 2016 at 08:37 PM 0
Share

$$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! :-)

avatar image Bunny83 TonanBora · May 25, 2016 at 10:55 PM 1
Share

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"));



avatar image TonanBora Bunny83 · May 26, 2016 at 12:21 AM 0
Share

Ah, I see then. I was indeed not using System. Silly me! :-P

Thank you for the clarification my fellow Bunny. :-)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

How to customize editor to show, in an array of scriptA within scriptB, the public vars of each scriptA[n] element? 1 Answer

Unity Editor Scripts: GameObject Added / Removed Event? 1 Answer

How can I preserve static object/data between editor and play? 2 Answers

HideFlags on children of visible objects. 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges