Namespace: | Sirenix.Utilities.Editor |
Assembly: | Sirenix.Utilities.Editor |
public static class GenericMenuExtensions
public static bool RemoveMenuItems(this GenericMenu menu, string name)
UnityEditor.GenericMenu | menu | The GenericMenu to remove items from. |
System.String | name | The name of the items to remove. |
System.Boolean | True if any items were removed, otherwise false. |
public static bool ReplaceOrAdd(this GenericMenu menu, string name, bool on, GenericMenu.MenuFunction func)
UnityEditor.GenericMenu | menu | The GenericMenu to replace items in. |
System.String | name | The name of the items to remove. |
System.Boolean | on | The on value to set the new menu item with. |
UnityEditor.GenericMenu.MenuFunction | func | The func to replace or add. |
System.Boolean | True if an item was replaced, otherwise false. |
public static bool ReplaceOrAdd(this GenericMenu menu, string name, bool on, GenericMenu.MenuFunction2 func2, object userData)
UnityEditor.GenericMenu | menu | The GenericMenu to replace items in. |
System.String | name | The name of the items to remove. |
System.Boolean | on | The on value to set the new menu item with. |
UnityEditor.GenericMenu.MenuFunction2 | func2 | The func to replace or add. |
System.Object | userData | The user data. |
System.Boolean | True if an item was replaced, otherwise false. |