Class UnityUiModalParameters
Unity-specific implementation of modal dialog parameters.
Extends base UiModalParameters with Unity serialization support for button components.
Provides both runtime interactive components and serialized data for persistence and editor integration.
Handles parameter validation and ensures data integrity through invariant maintenance.
Namespace: Serenity.Modal.InterfaceAdapters.EntityMappers
Assembly: Serenity.UnityModal.InterfaceAdapter.dll
Syntax
public class UnityUiModalParameters : UiModalParameters
Constructors
UnityUiModalParameters()
Initializes a new instance of UnityUiModalParameters with default values.
Creates empty button collections for runtime and serialized data.
Declaration
public UnityUiModalParameters()
UnityUiModalParameters(string, string, string, string, string, float, UiComponentAlignmentType, IFoundationViewElementFactory, AudioPlayerPlayClip, string, IUiThemeSounds, List<IUiInteractable>, List<SerializedComponentData>, bool, bool)
Initializes a new instance of UnityUiModalParameters with comprehensive configuration data.
Sets up modal appearance, content, and interactive button components for Unity UI system.
Handles both runtime interactive components and serialized data for editor support.
Declaration
public UnityUiModalParameters(string id, string guid, string signalTypeName, string title, string text, float textFontSize, UiComponentAlignmentType alignment, IFoundationViewElementFactory foundationViewElementFactory, AudioPlayerPlayClip audioPlayerPlayClip, string audioServiceId, IUiThemeSounds themeSounds, List<IUiInteractable> buttons, List<SerializedComponentData> serializedButtons = null, bool isTranslatingTitle = false, bool isTranslatingText = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | Unique identifier for the modal instance. |
| string | guid | Globally unique identifier for the modal. |
| string | signalTypeName | Type name of the event signal that triggers this modal. |
| string | title | Title text displayed at the top of the modal. |
| string | text | Main content text displayed in the modal body. |
| float | textFontSize | Font size for the modal body text. |
| UiComponentAlignmentType | alignment | Alignment configuration for modal content elements. |
| IFoundationViewElementFactory | foundationViewElementFactory | Factory for creating UI foundation elements. |
| AudioPlayerPlayClip | audioPlayerPlayClip | Audio playback functionality for UI sounds. |
| string | audioServiceId | Identifier for the audio service instance. |
| IUiThemeSounds | themeSounds | Audio theme configuration for modal interactions. |
| List<IUiInteractable> | buttons | List of interactive button components for the modal. |
| List<SerializedComponentData> | serializedButtons | Optional serialized button data for persistence. |
| bool | isTranslatingTitle | |
| bool | isTranslatingText |
Methods
EnsureInvariants()
Ensures data integrity and consistency for modal parameter collections.
Initializes null collections and maintains proper reference equality between internal and public button lists.
Should be called after deserialization or when parameter consistency needs to be validated.
Declaration
public void EnsureInvariants()