Class 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.
Inherited Members
Namespace: Serenity.Modal.Infrastructure.Factories
Assembly: Serenity.UnityModal.Infrastructure.dll
Syntax
public class UnityModalOptionsBuilder
Constructors
UnityModalOptionsBuilder(UnityModalOptionComponentCreator, IGameSettingsService, ILogService)
Declaration
public UnityModalOptionsBuilder(UnityModalOptionComponentCreator componentCreator, IGameSettingsService gameSettingsService, ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityModalOptionComponentCreator | componentCreator | |
| IGameSettingsService | gameSettingsService | |
| ILogService | logService |
Methods
CreateModalOptions(IReadOnlyList<UiOption>, IUiThemeDefinition)
Creates the modal's interactable components from its options, seeding initial values into game settings (so value options reflect their persisted state) and initializing each option's visuals.
Declaration
public List<IUiInteractable> CreateModalOptions(IReadOnlyList<UiOption> options, IUiThemeDefinition theme)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<UiOption> | options | The modal options to render; null yields an empty list. |
| IUiThemeDefinition | theme | The active UI theme providing the per-interaction prefab templates. |
Returns
| Type | Description |
|---|---|
| List<IUiInteractable> | The interactables, in option order, ready to be parented into the modal. |