docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GUIAction

    Represents an action that is tied to a GUI element.

    Inheritance
    object
    GUIAction
    CommandAction
    HoveredControlAction
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.U2D.Path.GUIFramework
    Assembly: Unity.2D.Path.Editor.dll
    Syntax
    public abstract class GUIAction

    Fields

    enable

    Func for GetEnable

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

    enableRepaint

    Func for EnabledRepaint

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

    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, bool>

    Properties

    ID

    The action ID.

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

    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
    bool

    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
    bool

    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
    bool

    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
    bool

    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
    bool

    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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)