logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityMenuOptionRuntimeSafety

    Provides runtime safety helpers for validating and normalizing menu option value and interaction type combinations.

    Inheritance
    object
    UnityMenuOptionRuntimeSafety
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Menu.Installation.Installers
    Assembly: Serenity.Menu.Installation.dll
    Syntax
    public static class UnityMenuOptionRuntimeSafety

    Methods

    CreateFallbackOption(UiOption)

    Creates a safe fallback menu action option when the original option cannot be used as configured.

    Declaration
    public static UiOption CreateFallbackOption(UiOption option)
    Parameters
    Type Name Description
    UiOption option
    Returns
    Type Description
    UiOption

    GetAllowedInteractionTypes(UiComponentValueType)

    Gets the interaction types that are valid for the specified UI component value type.

    Declaration
    public static IReadOnlyList<UiComponentInteractionType> GetAllowedInteractionTypes(UiComponentValueType valueType)
    Parameters
    Type Name Description
    UiComponentValueType valueType
    Returns
    Type Description
    IReadOnlyList<UiComponentInteractionType>

    HasCompatibleGameSettingType(UiComponentValueType, GameSettingsValueType)

    Determines whether a menu option value type is compatible with a game settings value type.

    Declaration
    public static bool HasCompatibleGameSettingType(UiComponentValueType optionValueType, GameSettingsValueType gameSettingsValueType)
    Parameters
    Type Name Description
    UiComponentValueType optionValueType
    GameSettingsValueType gameSettingsValueType
    Returns
    Type Description
    bool

    IsInteractionTypeAllowed(UiComponentValueType, UiComponentInteractionType)

    Determines whether the given interaction type is valid for the specified UI component value type.

    Declaration
    public static bool IsInteractionTypeAllowed(UiComponentValueType valueType, UiComponentInteractionType interactionType)
    Parameters
    Type Name Description
    UiComponentValueType valueType
    UiComponentInteractionType interactionType
    Returns
    Type Description
    bool

    NormalizeInteractionType(UiOption)

    Returns the option unchanged when its interaction type is valid, or clones it with the first valid interaction type for its value type.

    Declaration
    public static UiOption NormalizeInteractionType(UiOption option)
    Parameters
    Type Name Description
    UiOption option
    Returns
    Type Description
    UiOption
    In this article
    © 2026 Serenity. All Rights Reserved