docs.unity.cn
    Show / Hide Table of Contents

    Class CommandAction

    Represents an Action to process when the custom editor validates a command.

    Inheritance
    Object
    GUIAction
    CommandAction
    Inherited Members
    GUIAction.enable
    GUIAction.enableRepaint
    GUIAction.repaintOnMouseMove
    GUIAction.onPreRepaint
    GUIAction.onRepaint
    GUIAction.ID
    GUIAction.OnGUI(IGUIState)
    GUIAction.IsEnabled(IGUIState)
    GUIAction.IsRepaintEnabled(IGUIState)
    GUIAction.PreRepaint(IGUIState)
    GUIAction.CanTrigger(IGUIState)
    GUIAction.OnTrigger(IGUIState)
    GUIAction.OnPerform(IGUIState)
    Namespace: UnityEditor.U2D.Path.GUIFramework
    Syntax
    public class CommandAction : GUIAction

    Constructors

    CommandAction(String)

    Initializes and returns an instance of CommandAction

    Declaration
    public CommandAction(string commandName)
    Parameters
    Type Name Description
    String commandName

    The name of the command. When the custom editor validates a command with this name, it triggers the action.

    Fields

    onCommand

    The Action to execute.

    Declaration
    public Action<IGUIState> onCommand
    Field Value
    Type Description
    Action<IGUIState>

    Methods

    GetFinishContidtion(IGUIState)

    Checks to see if the finish condition has been met or not.

    Declaration
    protected override bool GetFinishContidtion(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Returns
    Type Description
    Boolean

    Returns true if the trigger condition is finished. Otherwise, returns false.

    Overrides
    GUIAction.GetFinishContidtion(IGUIState)

    GetTriggerContidtion(IGUIState)

    Checks to see if the trigger condition has been met or not.

    Declaration
    protected override bool GetTriggerContidtion(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Returns
    Type Description
    Boolean

    Returns true if the trigger condition has been met. Otherwise, returns false.

    Overrides
    GUIAction.GetTriggerContidtion(IGUIState)

    OnFinish(IGUIState)

    Calls the methods in its invocation list when the finish condition is met.

    Declaration
    protected override void OnFinish(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Overrides
    GUIAction.OnFinish(IGUIState)
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, March 1, 2022
    Terms of use