logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityUiToggleComponentActions

    Unity-specific actions for toggle UI components that handle boolean value interactions.
    Extends interactable component actions to include toggle-specific callbacks such as value change and submission events.
    Implements both IUiToggleableActions and IUiSubmittableActions interfaces for comprehensive toggle interaction handling.

    Inheritance
    object
    UnityUiToggleComponentActions
    Implements
    IUiToggleableActions
    IUiInteractableActions
    IUiComponentActions
    IComponentActions
    IUiSubmittableActions
    Namespace: Serenity.Ui.Infrastructure.Components
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public class UnityUiToggleComponentActions : UiInteractableComponentActions, IUiToggleableActions, IUiInteractableActions, IUiComponentActions, IComponentActions, IUiSubmittableActions

    Constructors

    UnityUiToggleComponentActions(Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent>, Action<IUiComponent, string>, Action<IUiComponent>, Action<IUiComponent>)

    Initializes toggle component actions with comprehensive callback configuration.
    Sets up all available action callbacks including toggle-specific and inherited interactable component behaviors.
    Provides complete event handling capability for toggle interactions within the UI system.

    Declaration
    public UnityUiToggleComponentActions(Action<IUiComponent> onToggle = null, Action<IUiComponent> onSubmit = null, Action<IUiComponent> awake = null, Action<IUiComponent> onEnable = null, Action<IUiComponent> update = null, Action<IUiComponent> onDisable = null, Action<IUiComponent> onDestroy = null, Action<IUiComponent> onDraggingStart = null, Action<IUiComponent> onDraggingEnd = null, Action<IUiComponent> onFocus = null, Action<IUiComponent> onBlur = null, Action<IUiComponent, string> selectComponentById = null, Action<IUiComponent> selectNextComponent = null, Action<IUiComponent> selectPreviousComponent = null)
    Parameters
    Type Name Description
    Action<IUiComponent> onToggle

    Callback for toggle value change events

    Action<IUiComponent> onSubmit

    Callback for toggle submission events

    Action<IUiComponent> awake

    Callback for component awakening

    Action<IUiComponent> onEnable

    Callback for component enabling

    Action<IUiComponent> update

    Callback for component updates

    Action<IUiComponent> onDisable

    Callback for component disabling

    Action<IUiComponent> onDestroy

    Callback for component destruction

    Action<IUiComponent> onDraggingStart

    Callback for drag operation start

    Action<IUiComponent> onDraggingEnd

    Callback for drag operation end

    Action<IUiComponent> onFocus

    Callback for component focus gain

    Action<IUiComponent> onBlur

    Callback for component focus loss

    Action<IUiComponent, string> selectComponentById

    Callback for component selection by ID

    Action<IUiComponent> selectNextComponent

    Callback for next component selection

    Action<IUiComponent> selectPreviousComponent

    Callback for previous component selection

    Fields

    _onSubmit

    Declaration
    protected Action<IUiComponent> _onSubmit
    Field Value
    Type Description
    Action<IUiComponent>

    Action callback triggered when the toggle component is submitted.
    Executed when the user confirms or activates the toggle through submission input.

    _onToggle

    Declaration
    protected Action<IUiComponent> _onToggle
    Field Value
    Type Description
    Action<IUiComponent>

    Action callback triggered when the toggle component's value changes.
    Executed whenever the user toggles the component between on and off states.

    Properties

    OnSubmit

    Gets or sets the toggle submission callback action.
    Invoked when the toggle component receives a submit input event.

    Declaration
    public Action<IUiComponent> OnSubmit { get; set; }
    Property Value
    Type Description
    Action<IUiComponent>

    The toggle submission callback action

    OnToggle

    Gets or sets the toggle value change callback action.
    Invoked whenever the toggle state changes between true and false values.

    Declaration
    public Action<IUiComponent> OnToggle { get; set; }
    Property Value
    Type Description
    Action<IUiComponent>

    The toggle value change callback action

    Implements

    IUiToggleableActions
    IUiInteractableActions
    IUiComponentActions
    IComponentActions
    IUiSubmittableActions
    In this article
    © 2026 Serenity. All Rights Reserved