docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SliderAction

    SliderAction implementation of a ClickAction

    Inheritance
    object
    GUIAction
    HoveredControlAction
    ClickAction
    SliderAction
    Inherited Members
    ClickAction.clickCount
    ClickAction.onClick
    ClickAction.GetTriggerContidtion(IGUIState)
    HoveredControlAction.hoveredControl
    HoveredControlAction.CanTrigger(IGUIState)
    GUIAction.enable
    GUIAction.enableRepaint
    GUIAction.repaintOnMouseMove
    GUIAction.onPreRepaint
    GUIAction.onRepaint
    GUIAction.ID
    GUIAction.OnGUI(IGUIState)
    GUIAction.IsEnabled(IGUIState)
    GUIAction.IsRepaintEnabled(IGUIState)
    GUIAction.PreRepaint(IGUIState)
    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 class SliderAction : ClickAction

    Constructors

    SliderAction(Control)

    Initializes and returns an instance of SliderAction

    Declaration
    public SliderAction(Control control)
    Parameters
    Type Name Description
    Control control

    The control to execcute an action for on slide.

    Fields

    onSliderBegin

    Action for OnSliderBegin

    Declaration
    public Action<IGUIState, Control, Vector3> onSliderBegin
    Field Value
    Type Description
    Action<IGUIState, Control, Vector3>

    onSliderChanged

    Action for OnSliderChanged

    Declaration
    public Action<IGUIState, Control, Vector3> onSliderChanged
    Field Value
    Type Description
    Action<IGUIState, Control, Vector3>

    onSliderEnd

    Action for OnSliderEnd

    Declaration
    public Action<IGUIState, Control, Vector3> onSliderEnd
    Field Value
    Type Description
    Action<IGUIState, Control, Vector3>

    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
    bool

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

    Overrides
    ClickAction.GetFinishContidtion(IGUIState)

    OnFinish(IGUIState)

    Post-processing for when the slider interaction finishes.

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

    The current state of the custom editor.

    Overrides
    GUIAction.OnFinish(IGUIState)

    OnPerform(IGUIState)

    Moves the slider to the new permission and executes onSliderChanged using the new position.

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

    The current state of the custom editor

    Overrides
    GUIAction.OnPerform(IGUIState)

    OnTrigger(IGUIState)

    Called when there is interaction with the slider. It updates the stored slider data with data post-interaction.

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

    The current state of the custom editor.

    Overrides
    ClickAction.OnTrigger(IGUIState)
    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)