This commit is contained in:
2026-11-24 15:51:02 +01:00
parent cca4d73e41
commit f4aa17114a
22092 changed files with 5042406 additions and 0 deletions
@@ -0,0 +1,11 @@
---
uid: input-system-remove-device
---
# Remove a device
When a Device is disconnected, it is removed from the system. A notification appears for [`InputDeviceChange.Removed`](xref:UnityEngine.InputSystem.InputDeviceChange) (sent with [`InputSystem.onDeviceChange`](xref:UnityEngine.InputSystem.InputSystem)) and the Devices are removed from the [`devices`](xref:UnityEngine.InputSystem.InputSystem) list. The system also calls [`InputDevice.OnRemoved`](xref:UnityEngine.InputSystem.InputDevice).
The [`InputDevice.added`](xref:UnityEngine.InputSystem.InputDevice) flag is reset to false in the process.
Note that Devices are not destroyed when removed. Device instances remain valid and you can still access them in code. However, trying to read values from the controls of these Devices leads to exceptions.