logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UiThemeValidatorEngine

    GUI-free engine behind UiThemeValidator: the structural contract a theme's template prefabs must satisfy (expressed as data so it is inspectable independently of the GUI window, mirroring SerenityHealthCheckValidator's shape), plus the checks that walk a theme's prefabs against it. Stays editor-side (not promoted to Business) because every check inspects a UnityEngine.GameObject's component tree via GetComponentInChildren -- Unity Editor/Engine APIs a Business assembly (noEngineReferences: true) cannot reference; another engine's component model is different, so this rule is necessarily engine-specific, not a portable Business rule.

    Inheritance
    object
    UiThemeValidatorEngine
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Ui.Installation.Settings.Editor
    Assembly: Serenity.UnityUi.Installation.Editor.dll
    Syntax
    public static class UiThemeValidatorEngine

    Fields

    CascadeViewTemplateField

    The optional cascade-view panel slot and the component (matched by type name) it must carry when set.

    Declaration
    public const string CascadeViewTemplateField = "CascadeViewTemplate"
    Field Value
    Type Description
    string

    LeaderboardTemplateField

    The optional leaderboard panel slot and the component (matched by type name) it must carry when set.

    Declaration
    public const string LeaderboardTemplateField = "LeaderboardTemplate"
    Field Value
    Type Description
    string

    PrimaryInputPromptTemplateField

    The primary-input-prompt template slot: required, but has no component contract beyond being a GameObject.

    Declaration
    public const string PrimaryInputPromptTemplateField = "PrimaryInputPromptTemplate"
    Field Value
    Type Description
    string

    RequiredInteractableSlots

    The template slots every theme is expected to carry, and the component type each one's prefab must contain (matched by type name, so this table stays inspectable without a hard type reference). Declared as data so the contract can be read/audited without opening the validator code.

    Declaration
    public static readonly IReadOnlyList<(string FieldName, string RequiredComponentTypeName)> RequiredInteractableSlots
    Field Value
    Type Description
    IReadOnlyList<(string label, string viewId)>

    Methods

    Validate(UnityUiThemeDefinition)

    Validates all template prefabs on a theme against the structural contract, collecting every issue (does not stop at the first failure). GUI-free counterpart to Serenity.Ui.Installation.Settings.Editor.UiThemeValidator.ValidateTheme(Serenity.Ui.Installation.Settings.UnityUiThemeDefinition), which throws on the first issue to preserve its existing dialog-per-failure UX.

    Declaration
    public static List<UiThemeValidatorEngine.Issue> Validate(UnityUiThemeDefinition theme)
    Parameters
    Type Name Description
    UnityUiThemeDefinition theme

    The theme definition to validate.

    Returns
    Type Description
    List<UiThemeValidatorEngine.Issue>

    Every issue found; empty when the theme is fully valid.

    In this article
    © 2026 Serenity. All Rights Reserved