logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityUiSelectorComponentFactory

    Factory for creating Unity UI selector components with automatic configuration based on value types.
    Handles instantiation and initialization of selector components including numeric and selectable value type setup.
    Provides specialized initialization logic for different value types including automatic default value creation for numeric types.

    Inheritance
    object
    UnityUiSelectorComponentFactory
    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 UnityUiSelectorComponentFactory : IUiComponentFactory

    Constructors

    UnityUiSelectorComponentFactory(UnityViewElementFactory)

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

    Declaration
    public UnityUiSelectorComponentFactory(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 selector component from template with full initialization.
    Instantiates the selector component GameObject, applies parameters and actions, and performs specialized setup based on value type.
    Handles different value types with appropriate initialization strategies for numeric and selectable configurations.

    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 selector component

    Actions actions

    Action handlers for selector 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 selector 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

    Implements

    IUiComponentFactory
    In this article
    © 2026 Serenity. All Rights Reserved