logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityUiThemeDefinition

    ScriptableObject that defines a UI theme configuration for the Serenity menu system.
    Contains all visual components, sounds, and theme-specific settings that can be applied to UI elements.
    Implements IUiThemeDefinition interface to provide foundation-agnostic theme management while leveraging Unity's asset system.

    Inheritance
    object
    UnityUiThemeDefinition
    Implements
    IUiThemeDefinition
    IFoundationSettings
    Namespace: Serenity.Ui.Installation.Settings
    Assembly: Serenity.UnityUi.Installation.dll
    Syntax
    public class UnityUiThemeDefinition : ScriptableObject, IUiThemeDefinition, IFoundationSettings

    Constructors

    UnityUiThemeDefinition()

    Declaration
    public UnityUiThemeDefinition()

    Fields

    AdaptMenuWidth

    Declaration
    public bool AdaptMenuWidth
    Field Value
    Type Description
    bool

    Whether to adapt menu width to text content (title and options).

    AdaptMenuWidthPadding

    Declaration
    public float AdaptMenuWidthPadding
    Field Value
    Type Description
    float

    Padding to apply when adapting menu width to text content.

    Components

    Declaration
    public UnityUiThemeComponents Components
    Field Value
    Type Description
    UnityUiThemeComponents

    Unity-specific UI theme components configuration.
    Contains all visual styling definitions including colors, sprites, fonts, and other Unity UI elements.

    DeselectAnimationTrigger

    Declaration
    public string DeselectAnimationTrigger
    Field Value
    Type Description
    string

    Optional animator trigger name to play when a component is deselected.
    Leave empty to skip deselection animation.

    FontSizeMultiplier

    Declaration
    public float FontSizeMultiplier
    Field Value
    Type Description
    float

    Multiplier applied to font size presets for theme-specific visual fine-tuning.
    A value of 1.0 uses the base preset sizes as-is. Values below 1.0 reduce font sizes, values above 1.0 increase them.

    Guid

    Declaration
    public string Guid
    Field Value
    Type Description
    string

    Globally unique identifier for this theme definition.
    Used for serialization and cross-reference management within the foundation.

    Id

    Declaration
    public string Id
    Field Value
    Type Description
    string

    Unique identifier for this UI theme definition.
    Used internally by the foundation to reference and manage theme instances.

    MenuBackground

    Declaration
    public GameObject MenuBackground
    Field Value
    Type Description
    GameObject

    The gameobject of the menu background.

    Name

    Declaration
    public string Name
    Field Value
    Type Description
    string

    Human-readable display name for this UI theme.
    Shown in UI selection menus and editor inspectors to identify the theme.

    SelectAnimationTrigger

    Declaration
    public string SelectAnimationTrigger
    Field Value
    Type Description
    string

    Optional animator trigger name to play when a component is selected.
    Leave empty to skip selection animation.

    ShowMenuBackground

    Declaration
    public bool ShowMenuBackground
    Field Value
    Type Description
    bool

    Whether to show a background for the menu.

    Sounds

    Declaration
    public UnityUiThemeSoundsDefinition Sounds
    Field Value
    Type Description
    UnityUiThemeSoundsDefinition

    Unity-specific UI theme sounds definition.
    Contains all audio clips and sound effect configurations associated with UI interactions in this theme.

    Implements

    IUiThemeDefinition
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved