Reset a device
Resetting a Device resets its Controls to their default state. You can do this manually using InputSystem.ResetDevice:
InputSystem.ResetDevice(Gamepad.current);
There are two types of resets as determined by the second parameter to InputSystem.ResetDevice:
| Type | Description |
|---|---|
| "Soft" Resets | This is the default. With this type, only controls that are not marked as dontReset are reset to their default value. This excludes controls such as Pointer.position from resets and thus prevents mouse positions resetting to (0,0). |
| "Hard" Resets | In this type, all controls are reset to their default value regardless of whether they have dontReset set or not. |
Resetting Controls this way is visible on Actions. If you reset a Device that is currently driving one or more Action, the Actions are cancelled. This cancellation is different from sending an event with default state. Whereas the latter may inadvertently perform Actions (For example, a button that was pressed would not appear to have been released), a reset will force clean cancellation.
Resets may be triggered automatically by the Input System depending on application focus.