logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Modal.Infrastructure.Factories

    Classes

    UnityModalButtonFactory

    Unity-specific factory for creating interactive button components for modal dialogs.
    Generates buttons with associated event handlers and submit actions based on provided data.
    Encapsulates the complex button creation process including theme sound mapping and event wiring.

    UnityModalOptionComponentCreator

    Creates a single modal option UI component (slider, toggle, selector, dropdown, input, submit) from a UiOption. This is the modal counterpart of UnityMenuComponentCreator: it reuses the same per-interaction parameter/factory construction, but wires interaction callbacks to view-free modal handlers — value changes persist through UnityModalComponentFactory (game settings by id, identical to menus) and submits dispatch the option's OnSubmitSignal. Selection/focus/navigation callbacks are intentionally left unwired (the modal component drives selection by index via its controller, exactly as the legacy submit buttons did).

    UnityModalOptionsBuilder

    Builds the interactable components for a modal from its rich UiOption array, the modal counterpart of UnityMenuOptionsBuilder. Each option is rendered via UnityModalOptionComponentCreator, seeded with its initial game-settings value (identical to menus), and visually initialized; the resulting IUiInteractable list is handed to the modal component, which parents and lays it out. Replaces the submit-only UnityModalButtonFactory.

    In this article
    © 2026 Serenity. All Rights Reserved