Enum InputDeviceChange
Indicates what type of change related to an InputDevice occurred.
Namespace: UnityEngine.InputSystem
Syntax
public enum InputDeviceChange
Remarks
Use onDeviceChange to receive notifications about changes to the input device setup in the system.
InputSystem.onDeviceChange +=
(device, change) =>
{
switch (change)
{
case InputDeviceChange.Added:
Debug.Log($"Device {device} was added");
break;
case InputDeviceChange.Removed:
Debug.Log($"Device {device} was removed");
break;
}
};
Fields
Name | Description |
---|---|
Added | A new device was added to the system. |
ConfigurationChanged | The configuration of a device has changed. |
Destroyed | |
Disabled | An existing device was disabled. |
Disconnected | A device reported by the IInputRuntime was Removed but was retained by the system as disconnectedDevices. |
Enabled | An existing device was re-enabled after having been Disabled. |
Reconnected | A device that was previously retained as Disconnected has been re-discovered and has been Added to the system again. |
Removed | An existing device was removed from the system. |
UsageChanged | The usages on a device have changed. |