logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityMenuOptionValidationService

    Service responsible for validating menu options before rendering.
    Ensures option IDs are unique and that game settings exist for options that require them.

    Inheritance
    object
    UnityMenuOptionValidationService
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Menu.Infrastructure.Views.Factories
    Assembly: Serenity.UnityMenu.Infrastructure.dll
    Syntax
    public class UnityMenuOptionValidationService

    Constructors

    UnityMenuOptionValidationService(IGameSettingsService, ILogService)

    Declaration
    public UnityMenuOptionValidationService(IGameSettingsService gameSettingsService, ILogService logService)
    Parameters
    Type Name Description
    IGameSettingsService gameSettingsService
    ILogService logService

    Methods

    ValidateOption(UiOption, string)

    Validates that a single option has valid game settings when required.

    Declaration
    public void ValidateOption(UiOption option, string menuId)
    Parameters
    Type Name Description
    UiOption option
    string menuId

    ValidateUniqueOptionIds(UiOption[], string)

    Validates that all option IDs are unique within the options array.
    Throws a detailed exception if duplicates are found, including indices for debugging.

    Declaration
    public void ValidateUniqueOptionIds(UiOption[] options, string menuId)
    Parameters
    Type Name Description
    UiOption[] options
    string menuId
    In this article
    © 2026 Serenity. All Rights Reserved