docs.unity.cn
    Show / Hide Table of Contents

    Class GUIAction

    Represents an action that is tied to a GUI element.

    Inheritance
    Object
    GUIAction
    CommandAction
    HoveredControlAction
    Namespace: UnityEditor.U2D.Path.GUIFramework
    Syntax
    public abstract class GUIAction : object

    Fields

    enable

    Func for GetEnable

    Declaration
    public Func<IGUIState, GUIAction, bool> enable
    Field Value
    Type Description
    Func<IGUIState, GUIAction, Boolean>

    enableRepaint

    Func for EnabledRepaint

    Declaration
    public Func<IGUIState, GUIAction, bool> enableRepaint
    Field Value
    Type Description
    Func<IGUIState, GUIAction, Boolean>

    onPreRepaint

    Action for OnPreRepaint

    Declaration
    public Action<IGUIState, GUIAction> onPreRepaint
    Field Value
    Type Description
    Action<IGUIState, GUIAction>

    onRepaint

    Func for OnRepaint

    Declaration
    public Action<IGUIState, GUIAction> onRepaint
    Field Value
    Type Description
    Action<IGUIState, GUIAction>

    repaintOnMouseMove

    Func for repaintOnMouseMove

    Declaration
    public Func<IGUIState, GUIAction, bool> repaintOnMouseMove
    Field Value
    Type Description
    Func<IGUIState, GUIAction, Boolean>

    Properties

    ID

    The action ID.

    Declaration
    public int ID { get; }
    Property Value
    Type Description
    Int32

    Methods

    CanTrigger(IGUIState)

    Determines whether the GUIAction can trigger.

    Declaration
    protected virtual bool CanTrigger(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Returns
    Type Description
    Boolean

    Always returns true.

    GetFinishContidtion(IGUIState)

    Determines whether the finish condition has been met.

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

    The current state of the custom editor.

    Returns
    Type Description
    Boolean

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

    GetTriggerContidtion(IGUIState)

    Determines whether the trigger condition has been met.

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

    The current state of the custom editor.

    Returns
    Type Description
    Boolean

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

    IsEnabled(IGUIState)

    Checks whether the GUIAction is enabled.

    Declaration
    public bool IsEnabled(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Returns
    Type Description
    Boolean

    Returns true if the GUIAction is enabled in the custom editor. Otherwise, returns false.

    IsRepaintEnabled(IGUIState)

    Checks whether the GUIAction should repaint.

    Declaration
    public bool IsRepaintEnabled(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Returns
    Type Description
    Boolean

    Returns true if the GUIAction should repaint. Otherwise, returns false.

    OnFinish(IGUIState)

    Calls the methods in its invocation list when finished.

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

    The current state of the custom editor.

    OnGUI(IGUIState)

    Calls the methods in its invocation list when Unity draws this GUIAction's GUI.

    Declaration
    public void OnGUI(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    OnPerform(IGUIState)

    Calls the methods in its invocation list when performed.

    Declaration
    protected virtual void OnPerform(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    OnTrigger(IGUIState)

    Calls the methods in its invocation list when triggered.

    Declaration
    protected virtual void OnTrigger(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    PreRepaint(IGUIState)

    Preprocessing that occurs before the GUI repaints.

    Declaration
    public void PreRepaint(IGUIState guiState)
    Parameters
    Type Name Description
    IGUIState guiState

    The current state of the custom editor.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, March 1, 2022
    Terms of use