logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityButton

    Reusable button wrapping a real Serenity UnityUiSubmitComponent (the theme's Submittable). Selectable by mouse (uGUI Button) or programmatically via Submit() (keyboard/gamepad driven by the owner). SetFocused(bool) tints it for manual focus navigation (e.g. the CascadeMenu), since standalone components aren't driven by Serenity's menu input router. Created via CreateButton(Transform, string, int, string, Action).

    Inheritance
    object
    SerenityButton
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Ui.Infrastructure.Widgets
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public sealed class SerenityButton

    Constructors

    SerenityButton(UnityUiSubmitComponent, GameObject, Button)

    Declaration
    public SerenityButton(UnityUiSubmitComponent submit, GameObject go, Button button)
    Parameters
    Type Name Description
    UnityUiSubmitComponent submit
    GameObject go
    Button button

    Properties

    GameObject

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

    Methods

    SetActive(bool)

    Declaration
    public void SetActive(bool on)
    Parameters
    Type Name Description
    bool on

    SetFocused(bool)

    Declaration
    public void SetFocused(bool on)
    Parameters
    Type Name Description
    bool on

    SetInteractable(bool)

    Declaration
    public void SetInteractable(bool on)
    Parameters
    Type Name Description
    bool on

    SetLabel(string)

    Declaration
    public void SetLabel(string text)
    Parameters
    Type Name Description
    string text

    Submit()

    Triggers the submit action (the same path as a click), for keyboard/gamepad selection.

    Declaration
    public void Submit()
    In this article
    © 2026 Serenity. All Rights Reserved