- Home /
How to add a separator in a submenu of GenericMenu?
You can call AddSeparator("") to create a separator in the main menu. But how do you create a separator in a submenu? I tried AddSeparator("MenuItem/"),AddSeparator("MenuItem/*") and AddSeparator("MenuItem/-") but it doesn't work. The closest solution is to do AddSeparator("MenuItem/ "): it doesn't create a separator line but an empty space between the objects.
Answer by Needleski · Feb 07, 2016 at 01:38 PM
Old question, but, according to the docs (http://docs.unity3d.com/ScriptReference/GenericMenu.AddSeparator.html) you simply use AddSeparator("MenuItem/ "). Just tried this myself (Unity 5.3) and it works. Guess this was a bug in a previous Unity version.
Your answer
Follow this Question
Related Questions
dynamically creating MenuItem via an xml File 2 Answers
Paused Menu backdrop 1 Answer
Load/Save script 0 Answers