logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class MenuOptionTransitionAuthoring

    Authors the "open a view from this menu" option a module wizard wires into an existing menu: a UiOption whose ValueType is TRANSITION at InteractionType = STRING (the only interaction type UiOptionMenuTransitionValue accepts), carrying a UiOptionMenuTransitionValue whose string value is the navigation target read by UnityMenuSubmitService.SubmitTransition. Shared by the Leaderboard and Achievements wizards so two modules cannot disagree about what such an option looks like.

    Inheritance
    object
    MenuOptionTransitionAuthoring
    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.Settings.Editor
    Assembly: Serenity.UnityMenu.Infrastructure.Editor.dll
    Syntax
    public static class MenuOptionTransitionAuthoring

    Methods

    BuildTransitionOption(UnityMenuSettingsDefinition, string, bool, string, string)

    Builds the transition option without touching the menu.

    Declaration
    public static UiOption BuildTransitionOption(UnityMenuSettingsDefinition targetMenu, string optionLabel, bool isTranslatingLabel, string targetViewId, string fallbackLabelIdentifier)
    Parameters
    Type Name Description
    UnityMenuSettingsDefinition targetMenu

    The menu the option is destined for; names the option's id and view.

    string optionLabel

    The label the option renders.

    bool isTranslatingLabel

    Whether the label is a localization key.

    string targetViewId

    The view the option transitions to.

    string fallbackLabelIdentifier

    Identifier used when the label sanitizes to nothing.

    Returns
    Type Description
    UiOption

    The built option.

    ComposeOptionId(string, string, string)

    The deterministic id an option wired by a wizard carries, derived from the menu and the label so a re-run upserts its own option instead of appending a duplicate.

    Declaration
    public static string ComposeOptionId(string menuId, string optionLabel, string fallbackLabelIdentifier)
    Parameters
    Type Name Description
    string menuId

    Id of the menu the option lives on.

    string optionLabel

    The label the author typed.

    string fallbackLabelIdentifier

    Identifier used when the label sanitizes to nothing.

    Returns
    Type Description
    string

    The option id.

    UpsertTransitionOption(UnityMenuSettingsDefinition, string, bool, string, string)

    Adds the transition option to targetMenu, replacing the option matching ComposeOptionId(string, string, string) instead of appending a duplicate — a re-run repairs its own stale option. The caller owns dirtying and saving the menu asset.

    Declaration
    public static void UpsertTransitionOption(UnityMenuSettingsDefinition targetMenu, string optionLabel, bool isTranslatingLabel, string targetViewId, string fallbackLabelIdentifier)
    Parameters
    Type Name Description
    UnityMenuSettingsDefinition targetMenu

    The menu to edit.

    string optionLabel

    The label the option renders.

    bool isTranslatingLabel

    Whether the label is a localization key.

    string targetViewId

    The view the option transitions to.

    string fallbackLabelIdentifier

    Identifier used when the label sanitizes to nothing.

    In this article
    © 2026 Serenity. All Rights Reserved