Class 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).
Inherited Members
Namespace: Serenity.Modal.Infrastructure.Factories
Assembly: Serenity.UnityModal.Infrastructure.dll
Syntax
public class UnityModalOptionComponentCreator
Constructors
UnityModalOptionComponentCreator(IGameSettingsService, IFoundationViewElementFactory, AudioPlayerPlayClip, string, IUiService, ILogService, IEventDispatcherService, UnityModalComponentFactory, float, UnityUiSubmitComponentFactory, UnityUiToggleComponentFactory, UnityUiSelectorComponentFactory, UnityUiSliderComponentFactory, UnityUiDropdownComponentFactory, UnityUiInputComponentFactory)
Declaration
public UnityModalOptionComponentCreator(IGameSettingsService gameSettingsService, IFoundationViewElementFactory foundationViewElementFactory, AudioPlayerPlayClip audioPlayerPlayClip, string audioPlayerServiceId, IUiService uiService, ILogService logService, IEventDispatcherService eventDispatcherService, UnityModalComponentFactory valueFactory, float floatIncrement, UnityUiSubmitComponentFactory submitComponentFactory, UnityUiToggleComponentFactory toggleComponentFactory, UnityUiSelectorComponentFactory selectorComponentFactory, UnityUiSliderComponentFactory sliderComponentFactory, UnityUiDropdownComponentFactory dropdownComponentFactory, UnityUiInputComponentFactory inputComponentFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameSettingsService | gameSettingsService | |
| IFoundationViewElementFactory | foundationViewElementFactory | |
| AudioPlayerPlayClip | audioPlayerPlayClip | |
| string | audioPlayerServiceId | |
| IUiService | uiService | |
| ILogService | logService | |
| IEventDispatcherService | eventDispatcherService | |
| UnityModalComponentFactory | valueFactory | |
| float | floatIncrement | |
| UnityUiSubmitComponentFactory | submitComponentFactory | |
| UnityUiToggleComponentFactory | toggleComponentFactory | |
| UnityUiSelectorComponentFactory | selectorComponentFactory | |
| UnityUiSliderComponentFactory | sliderComponentFactory | |
| UnityUiDropdownComponentFactory | dropdownComponentFactory | |
| UnityUiInputComponentFactory | inputComponentFactory |
Methods
CreateComponent(UiOption, int, IUiThemeDefinition)
Creates the option GameObject for the given option, dispatching on its interaction type.
Declaration
public GameObject CreateComponent(UiOption option, int optionIndex, IUiThemeDefinition theme)
Parameters
| Type | Name | Description |
|---|---|---|
| UiOption | option | The option to build. |
| int | optionIndex | The option's index within the modal. |
| IUiThemeDefinition | theme | The active UI theme providing the per-interaction prefab templates. |
Returns
| Type | Description |
|---|---|
| GameObject | The created option GameObject (carrying a UnityUiInteractableComponent). |