logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class CustomToggle

    Extended Toggle that synchronizes an additional GameObject's active state with the toggle's isOn value. The GameObject is enabled when isOn is true, and disabled when isOn is false. Updates occur at the same moment the base Toggle updates its own graphic visibility.

    Inheritance
    object
    CustomToggle
    Namespace: Serenity.Ui.Infrastructure.Components
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public class CustomToggle : Toggle

    Constructors

    CustomToggle()

    Declaration
    public CustomToggle()

    Properties

    ActiveGameObject

    The GameObject that is enabled/disabled based on the toggle's isOn state.

    Declaration
    public GameObject ActiveGameObject { get; set; }
    Property Value
    Type Description
    GameObject

    Methods

    OnDisable()

    Declaration
    protected override void OnDisable()

    OnEnable()

    Declaration
    protected override void OnEnable()

    OnValidate()

    Declaration
    protected override void OnValidate()

    Start()

    Declaration
    protected override void Start()
    In this article
    © 2026 Serenity. All Rights Reserved