logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityUiDropdownComponentFactory

    Factory for creating Unity UI dropdown components with comprehensive dropdown functionality and event management.
    Handles instantiation, initialization, and configuration of dropdown controls including option setup, event listeners, and hover interactions.
    Provides specialized dropdown behavior with automatic option generation and interactive hover selection capabilities.

    Inheritance
    object
    UnityUiDropdownComponentFactory
    Implements
    IUiComponentFactory
    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.Components.Factories
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public class UnityUiDropdownComponentFactory : IUiComponentFactory

    Constructors

    UnityUiDropdownComponentFactory(UnityViewElementFactory)

    Initializes the dropdown component factory with Unity view element factory dependency.
    Sets up the factory with the required view element creation capabilities for dropdown component instantiation.

    Declaration
    public UnityUiDropdownComponentFactory(UnityViewElementFactory unityViewElementFactory)
    Parameters
    Type Name Description
    UnityViewElementFactory unityViewElementFactory

    Factory for creating Unity view elements

    Methods

    CreateUiComponent<Element, Parameters, Actions>(Parameters, Actions, IFoundationViewElement, ILogService)

    Creates and configures a Unity UI dropdown component from template with full initialization.
    Instantiates the dropdown component GameObject, applies parameters and actions, and performs specialized dropdown setup including option population and event management.
    Handles dropdown-specific initialization with proper event state management and listener configuration.

    Declaration
    public Element CreateUiComponent<Element, Parameters, Actions>(Parameters parameters, Actions actions, IFoundationViewElement template, ILogService logService) where Element : IFoundationViewElement where Parameters : IUiComponentParameters where Actions : IUiComponentActions
    Parameters
    Type Name Description
    Parameters parameters

    Configuration parameters for the dropdown component

    Actions actions

    Action handlers for dropdown component interactions

    IFoundationViewElement template

    Template foundation view element for component instantiation

    ILogService logService

    Logging service for error reporting and debugging

    Returns
    Type Description
    Element

    Fully configured Unity UI dropdown component ready for use

    Type Parameters
    Name Description
    Element

    The target UI component element type

    Parameters

    The component parameters type

    Actions

    The component actions type

    Exceptions
    Type Condition
    Exception

    Thrown when component type is unsupported, template is null, or GameObject creation fails

    InvalidOperationException

    Thrown when the required component type cannot be retrieved from the created GameObject

    Implements

    IUiComponentFactory
    In this article
    © 2026 Serenity. All Rights Reserved