Class UnityPlayerInputSettingsDefinition
Unity ScriptableObject settings definition for player input service configuration.
Contains all parameters for input handling including timing, action mappings, and UI navigation setup.
Provides Unity-specific implementation of IPlayerInputServiceSettingsDefinition with asset references and action lookups.
Namespace: Serenity.InputGateway.Installation.Settings
Assembly: Serenity.UnityPlayerInput.Installation.dll
Syntax
public class UnityPlayerInputSettingsDefinition : ScriptableObject, IPlayerInputServiceSettingsDefinition, IFoundationSettings
Constructors
UnityPlayerInputSettingsDefinition()
Declaration
public UnityPlayerInputSettingsDefinition()
Fields
CancelActionName
Declaration
public string CancelActionName
Field Value
| Type | Description |
|---|---|
| string | Name of the action within the UI action map used for canceling/backing out of menus. |
ChangeInterval
Declaration
public float ChangeInterval
Field Value
| Type | Description |
|---|---|
| float | Interval in seconds between input changes when navigating UI elements. |
ConsecutiveChangesBeforeSpeedUp
Declaration
public int ConsecutiveChangesBeforeSpeedUp
Field Value
| Type | Description |
|---|---|
| int | Number of consecutive input changes required before speeding up the input response. |
FastChangeInterval
Declaration
public float FastChangeInterval
Field Value
| Type | Description |
|---|---|
| float | Interval in seconds for fast consecutive input changes after threshold is reached. |
Guid
Declaration
public string Guid
Field Value
| Type | Description |
|---|---|
| string | Unique GUID for the settings instance. |
Id
Declaration
public string Id
Field Value
| Type | Description |
|---|---|
| string | Unique identifier for the settings instance. |
InputAsset
Declaration
public InputActionAsset InputAsset
Field Value
| Type | Description |
|---|---|
| InputActionAsset | Input action asset containing all defined input actions and action maps. |
NavigateActionName
Declaration
public string NavigateActionName
Field Value
| Type | Description |
|---|---|
| string | Name of the action within the UI action map used for navigation (e.g., moving between UI elements). |
SubmitActionName
Declaration
public string SubmitActionName
Field Value
| Type | Description |
|---|---|
| string | Name of the action within the UI action map used for submitting/confirming selections. |
UiActionMapName
Declaration
public string UiActionMapName
Field Value
| Type | Description |
|---|---|
| string | Name of the action map within the input asset that contains UI navigation actions. |
onPrimaryJoinTask
Declaration
public UnityReflectionCallTaskDefinition onPrimaryJoinTask
Field Value
| Type | Description |
|---|---|
| UnityReflectionCallTaskDefinition | Task to execute when a primary device joins. |
playerPrefab
Declaration
public PlayerInput playerPrefab
Field Value
| Type | Description |
|---|---|
| PlayerInput |
routing
Declaration
public UnityPlayerInputRoutingSettings routing
Field Value
| Type | Description |
|---|---|
| UnityPlayerInputRoutingSettings | Settings for input routing within the Unity player. |
Properties
ChangeIntervalFast
Interval used for fast consecutive input changes after threshold is reached.
Enables quicker navigation when user holds down input for multiple changes.
Declaration
public float ChangeIntervalFast { get; set; }
Property Value
| Type | Description |
|---|---|
| float | Interval in seconds for fast input changes. |
Remarks
The exact timing behavior depends on the concrete implementation.
OnPrimaryJoinTask
Task to execute when a primary device joins.
Configured as a UnityReflectionCallTaskDefinition for Unity-specific task execution.
Declaration
public IReflectionCallTaskDefinition OnPrimaryJoinTask { get; set; }
Property Value
| Type | Description |
|---|---|
| IReflectionCallTaskDefinition | The configured reflection call task definition. |
Methods
GetSelectedActionMap()
Retrieves the UI action map configured in the input asset.
Returns null if the input asset is not set or the action map is not found.
Declaration
public InputActionMap GetSelectedActionMap()
Returns
| Type | Description |
|---|---|
| InputActionMap | The configured UI action map or null if not found. |
GetSelectedCancelAction()
Retrieves the cancel action from the configured UI action map.
Used for backing out of menus and canceling operations.
Declaration
public InputAction GetSelectedCancelAction()
Returns
| Type | Description |
|---|---|
| InputAction | The cancel input action or null if not found. |
GetSelectedNavigateAction()
Retrieves the navigate action from the configured UI action map.
Used for menu navigation and UI traversal operations.
Declaration
public InputAction GetSelectedNavigateAction()
Returns
| Type | Description |
|---|---|
| InputAction | The navigate input action or null if not found. |
GetSelectedSubmitAction()
Retrieves the submit action from the configured UI action map.
Used for confirming selections and activating UI elements.
Declaration
public InputAction GetSelectedSubmitAction()
Returns
| Type | Description |
|---|---|
| InputAction | The submit input action or null if not found. |
ToString()
Returns a string representation of the settings configuration for debugging and logging purposes.
Includes timing parameters and input asset information.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A formatted string containing the key configuration values. |