Description
Wraps Unity's Input System to provide dialogue-specific input handling. Loads the Dialogue action map from an InputActionAsset, caches actions by name, and provides methods to check input state and resolve per-device display labels.
Mouse interaction with options does not go through the action map. The option views call RaiseOptionClicked and RaiseOptionHovered, which fire the corresponding events. See Input System.
Interface
| Type |
|---|
| IDialogueInputService |
| IGameInputProvider |
| IDisposable |
Inherits
Events
| Name | Type | Description |
|---|
| OnOptionClicked | Action<int> | Raised when a dialogue option is clicked by mouse. |
| OnOptionHovered | Action<int> | Raised when a dialogue option is hovered by mouse. |
| OnDeviceModeChanged | Action<InputDeviceMode> | Raised when auto-detection switches between keyboard and gamepad. |
Public Methods
| Name | Parameters | Return Type | Description |
|---|
| CreateFromSettings | ModuleSettings | DialogueInputService | Static factory that creates and configures the service from module settings. |
| WasPressed | string actionName | bool | Returns true if the named action was pressed this frame. |
| ReadLookDelta | N/A | Vector2 | Reads the look delta, used by the camera input policy to detect the player looking away. |
| GetDisplayLabel | string actionName | string | Returns the human-readable binding label for the current device mode. |
| Enable | N/A | void | Enables the dialogue action map. |
| Disable | N/A | void | Disables the dialogue action map. |
| RaiseOptionClicked | int index | void | Raises OnOptionClicked. Called by the option views on mouse click. |
| RaiseOptionHovered | int index | void | Raises OnOptionHovered. Called by the option views on mouse hover. |
| Dispose | N/A | void | Unsubscribes from Input System callbacks and releases the action map. |
CreateFromSettings takes the dialogue ModuleSettings (referred to in source through the DialogueSettings alias). If settings supply no InputActionAsset, it falls back to Resources/DIALOGUE-SYSTEM/Input/DialogueInputActions.