logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityPrimaryInputPromptViewFactory

    Factory class for creating Unity primary input prompt views with complete dependency injection and initialization.
    Handles the creation and configuration of primary input prompt views including device detection, player input setup, and UI routing.
    Integrates audio services, input gates, and theme components for comprehensive primary player device assignment functionality.

    Inheritance
    object
    UnityPrimaryInputPromptViewFactory
    Implements
    IPrimaryInputPromptViewFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Ui.Infrastructure.Views.Factories
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public class UnityPrimaryInputPromptViewFactory : IPrimaryInputPromptViewFactory

    Constructors

    UnityPrimaryInputPromptViewFactory(AudioPlayerPlayClip, ILogService, IFoundationViewElementFactory)

    Initializes the primary input prompt view factory with required dependencies.
    Sets up audio playback, logging, and view element creation for prompt view creation.

    Declaration
    public UnityPrimaryInputPromptViewFactory(AudioPlayerPlayClip audioPlayerPlayClip, ILogService logService, IFoundationViewElementFactory viewElementFactory)
    Parameters
    Type Name Description
    AudioPlayerPlayClip audioPlayerPlayClip

    Audio playback delegate for UI sound effects

    ILogService logService

    Logging service for debugging and error reporting

    IFoundationViewElementFactory viewElementFactory

    Factory for creating foundation view elements

    Methods

    CreateView(object, IFoundationSettings, string, IUiThemeDefinition, IPlayerInputService, IViewModel)

    Creates and configures a complete primary input prompt view with all dependencies.
    Instantiates the visual prompt prefab, sets up input detection components, configures player input routing, and initializes the view with proper dependency injection.
    The created view is initially disabled and must be activated externally when needed for device detection.

    Declaration
    public IPrimaryInputPromptView CreateView(object canvas, IFoundationSettings settings, string audioServiceId, IUiThemeDefinition theme, IPlayerInputService playerInputService, IViewModel viewModel)
    Parameters
    Type Name Description
    object canvas

    The Unity Canvas where the prompt view will be created

    IFoundationSettings settings

    Foundation settings for view configuration

    string audioServiceId

    Audio service identifier for sound effect playback

    IUiThemeDefinition theme

    UI theme definition containing visual component templates

    IPlayerInputService playerInputService

    Player input service for device management

    IViewModel viewModel

    View model for prompt state management

    Returns
    Type Description
    IPrimaryInputPromptView

    Configured primary input prompt view ready for device detection

    Implements

    IPrimaryInputPromptViewFactory
    In this article
    © 2026 Serenity. All Rights Reserved