Class UnityUiSubmitComponentFactory
Factory for creating Unity UI submit components with button functionality and submission capabilities.
Handles instantiation and initialization of submit button components including action binding and visual setup.
Provides standardized creation of submit UI elements within the Serenity component factory system.
Implements
Inherited Members
Namespace: Serenity.Ui.Infrastructure.Components.Factories
Assembly: Serenity.UnityUi.Infrastructure.dll
Syntax
public class UnityUiSubmitComponentFactory : IUiComponentFactory
Constructors
UnityUiSubmitComponentFactory(UnityViewElementFactory)
Initializes the submit component factory with Unity view element factory dependency.
Sets up the factory with the required view element creation capabilities for submit component instantiation.
Declaration
public UnityUiSubmitComponentFactory(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 submit component from template with full initialization.
Instantiates the submit component GameObject, applies parameters and actions, and performs basic component setup.
Provides error handling for invalid component types, null templates, or missing GameObjects during creation.
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 submit component |
| Actions | actions | Action handlers for submit 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 submit 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 |