Class UnityUiSubmitComponent
Unity-specific UI submit component that handles button interactions and submission events with optional selector adaptation.
Provides button functionality with text display, layout management, and dynamic selector width adjustment based on text content.
Implements IUiSubmittable interface for submission event handling within the Unity UI system.
Inheritance
Inherited Members
Namespace: Serenity.Ui.Infrastructure.Components
Assembly: Serenity.UnityUi.Infrastructure.dll
Syntax
public class UnityUiSubmitComponent : UnityUiInteractableComponent, IUiInteractable, IUiComponent, IUiSubmittable, IComponent, IFoundationSettings
Constructors
UnityUiSubmitComponent()
Initializes a new Unity UI submit component with submit interaction type.
Sets up the component for button submission operations within the UI system.
Declaration
public UnityUiSubmitComponent()
Properties
SubmittableActions
Gets or sets the submittable actions interface for handling submit events.
Manages callbacks for submission interactions and button activation events.
Declaration
public IUiSubmittableActions SubmittableActions { get; set; }
Property Value
| Type | Description |
|---|---|
| IUiSubmittableActions | The submittable actions interface |
Methods
InitializeVisualElement()
Initializes the visual element components and event listeners for the submit component.
Configures button text, text alignment, and layout group settings based on component parameters.
Maps foundation alignment types to Unity-specific alignment configurations.
Declaration
public override void InitializeVisualElement()
Overrides
OnEnable()
Unity lifecycle method called when the component is enabled.
Initiates selector width adaptation setup and visual element initialization if configured.
Starts coroutines for dynamic selector decoration and button reselection.
Declaration
public override void OnEnable()
Overrides
SetValue(string)
Sets the display value of the submit component, updating the button text if available.
Updates the TextMeshPro text component within the button to display the specified value.
Declaration
public override void SetValue(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The text value to display on the button |
Overrides
Submit()
Performs the submit action and triggers the associated submit events.
Calls base submit functionality and invokes submittable action callbacks for comprehensive submission handling.
Declaration
public override void Submit()