Class MenuAction
Base class for any action that appears on the ProBuilder toolbar.
Inherited Members
Namespace: UnityEditor.ProBuilder
Assembly: Unity.ProBuilder.Editor.dll
Syntax
public abstract class MenuAction
Constructors
Name | Description |
---|---|
MenuAction() | Creates a new button on the ProBuilder toolbar in the Editor. |
Fields
Name | Description |
---|---|
onPerformAction | Invoked when the user selects an action to perform from the toolbar. |
Properties
Name | Description |
---|---|
disabledIcon | Gets the icon to use when the action button on the toolbar is disabled. By default, this function looks for an image named
|
enabled | Gets whether or not the action is valid given the current selection. True if this action is valid with the current selection and mode. |
group | Gets the category assigned to this action. |
hasFileMenuEntry | Gets whether this class should have an entry built into the hardware menu. This is not implemented for custom actions. |
Gets whether this action is visible in the ProBuilder toolbar. True if this action appears in the toolbar with the current mode and settings; false otherwise. |
|
icon | Gets the icon to display on the toolbar for this action. |
iconMode | Gets or sets whether the Toolbar display mode is set to Icon mode (true) or Text mode (false). |
menuActionState | Gets a flag that indicates both the visibility and enabled state of an action to determine whether the current mode and selection is valid for it. |
menuTitle | Gets the override title for this action to display on the toolbar button. |
optionsMenuState | Gets a flag that indicates whether the action implements extra options. If it does, it must also implement OnSettingsGUI() so that an options indicator appears for this action button. |
toolbarPriority | Gets the value to optionally influence where this menu item appears in the toolbar. The default value is -1 (no preference). |
tooltip | Gets the contents of the tooltip to display for this menu action. |
validSelectModes | Gets the SelectMode states where this action applies. This drives the hidden property unless you override it. |
Methods
Name | Description |
---|---|
ContentsChanged() | |
DoAlternateAction() | Performs the action for this menu item when in Text mode. |
OnSettingsDisable() | Called when the settings window is closed. |
OnSettingsEnable() | Called when the settings window is opened. |
OnSettingsGUI() | Implement the extra settings GUI for your action in this method. |
PerformAction() | Performs the action for this menu item. Use PerformActionImplementation() to implement the action. Calling this method triggers the onPerformAction event. |
PerformActionImplementation() | Performs the action for this menu item. Use this method to implement the action and then use PerformAction() to call it. |
PerformAltAction() | |
RegisterChangedCallbacks() | |
UnregisterChangedCallbacks() |
Events
Name | Description |
---|---|
changed |