Interface IElementAdderMenuCommand<TContext>
Interface for a menu command that can be included in an IElementAdderMenu either by annotating an implementation of the IElementAdderMenuCommand<TContext> interface with ElementAdderMenuCommandAttribute or directly by calling AddCustomCommand(IElementAdderMenuCommand<TContext>).
Namespace: Unity.VisualScripting.ReorderableList.Element_Adder_Menu
Syntax
public interface IElementAdderMenuCommand<TContext>
Type Parameters
Name | Description |
---|---|
TContext | Type of the context object that elements can be added to. |
Properties
Content
Gets the content of the menu command.
Declaration
GUIContent Content { get; }
Property Value
Type | Description |
---|---|
GUIContent |
Methods
CanExecute(IElementAdder<TContext>)
Determines whether the command can be executed.
Declaration
bool CanExecute(IElementAdder<TContext> elementAdder)
Parameters
Type | Name | Description |
---|---|---|
IElementAdder<TContext> | elementAdder | The associated element adder provides access to
the |
Returns
Type | Description |
---|---|
Boolean | A value of |
Execute(IElementAdder<TContext>)
Executes the command.
Declaration
void Execute(IElementAdder<TContext> elementAdder)
Parameters
Type | Name | Description |
---|---|---|
IElementAdder<TContext> | elementAdder | The associated element adder provides access to
the |