|
The GenericMenu lets you create a custom context and dropdown menus.
Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
AddItem |
Add an item to the menu |
AddDisabledItem |
Add a disabled item to the menu |
AddSeparator |
Add a seperator item to the menu |
GetItemCount |
Get number of items in the menu |
ShowAsContext |
Show the menu under the mouse |
DropDown |
Show the menu at the given screen rect |
MenuFunction |
Callback function, called when a menu item is selected |
MenuFunction2 |
Callback function with user data, called when a menu item is selected |