logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class 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.

    Inheritance
    object
    UnityModalButtonFactory
    Implements
    IModalButtonFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Modal.Infrastructure.Factories
    Assembly: Serenity.UnityModal.Infrastructure.dll
    Syntax
    public class UnityModalButtonFactory : IModalButtonFactory

    Constructors

    UnityModalButtonFactory(IUiComponentFactory, IFoundationViewElementFactory, AudioPlayerPlayClip, string, IEventDispatcherService, IUiService, ILogService)

    Initializes a new instance of the UnityModalButtonFactory class.

    Declaration
    public UnityModalButtonFactory(IUiComponentFactory submitFactory, IFoundationViewElementFactory foundationViewElementFactory, AudioPlayerPlayClip audioPlayerPlayClip, string audioPlayerServiceId, IEventDispatcherService eventDispatcherService, IUiService uiService, ILogService logService)
    Parameters
    Type Name Description
    IUiComponentFactory submitFactory

    Factory for creating submit button UI components.

    IFoundationViewElementFactory foundationViewElementFactory

    Factory for creating foundation view elements.

    AudioPlayerPlayClip audioPlayerPlayClip

    Audio playback functionality for UI sounds.

    string audioPlayerServiceId

    Identifier for the audio player service.

    IEventDispatcherService eventDispatcherService

    Service for dispatching button submit events.

    IUiService uiService

    UI service for theme sounds resolution.

    ILogService logService

    Service for logging operations.

    Methods

    CreateModalButtons(List<SerializedComponentData>, IUiThemeDefinition)

    Declaration
    public List<IUiInteractable> CreateModalButtons(List<SerializedComponentData> buttonsData, IUiThemeDefinition theme)
    Parameters
    Type Name Description
    List<SerializedComponentData> buttonsData
    IUiThemeDefinition theme
    Returns
    Type Description
    List<IUiInteractable>

    Implements

    IModalButtonFactory
    In this article
    © 2026 Serenity. All Rights Reserved