How can I add a separator to a menu I create in a MenuItem script? Should I just use a disabled item with "MyMenu/---------" or is there a better way to do it? (And will that even work twice?)
I've had no luck getting separators to work, and since you can't control the order of menu items it would be hard to get the separator where you want it. Would like to know if you figure it out though.
(p.s. are you really a Newf? I grew up in NS ...)
Yeah. I'm From Hare Bay (the one near Gambo). Grew up in Toronto from the time I was 10 though.
Answer by Jake-L
Mar 13, 2011 at 11:57 AM
That's easy, see link text
Thanks Jake! (What is the "false" for? It's not in the docs)
The isValidateFunction parameter is in the docs: http://unity3d.com/support/documentation/ScriptReference/MenuItem.MenuItem.html
The link seems to be broken! :(
I've updated the link in my answer...I guess the qato change broke it.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
2 People are following this question.
Editor Menu Item open Window
How would you go about showing an editor preferences panel in the inspector?
How does the priority of a Editor menuItem change item placement?
Editor Scripting Question
Is it possible to set the editor layout through the command line for debugging?