A game about forced loneliness, made by TACStudios
1using System; 2using UnityEngine.InputSystem.LowLevel; 3using UnityEngine.InputSystem.Utilities; 4 5namespace UnityEngine.InputSystem 6{ 7 /// <summary> 8 /// Indicates what type of change related to an <see cref="InputDevice">input device</see> occurred. 9 /// </summary> 10 /// <remarks> 11 /// Use <see cref="InputSystem.onDeviceChange"/> to receive notifications about changes 12 /// to the input device setup in the system. 13 /// 14 /// <example> 15 /// <code> 16 /// InputSystem.onDeviceChange += 17 /// (device, change) => 18 /// { 19 /// switch (change) 20 /// { 21 /// case InputDeviceChange.Added: 22 /// Debug.Log($"Device {device} was added"); 23 /// break; 24 /// case InputDeviceChange.Removed: 25 /// Debug.Log($"Device {device} was removed"); 26 /// break; 27 /// } 28 /// }; 29 /// </code> 30 /// </example> 31 /// </remarks> 32 public enum InputDeviceChange 33 { 34 /// <summary> 35 /// A new device was added to the system. This is triggered <em>after</em> the device 36 /// has already been added, i.e. it already appears on <see cref="InputSystem.devices"/>. 37 /// 38 /// See also <see cref="InputSystem.AddDevice{TDevice}(string)"/> and <see cref="InputDevice.added"/>. 39 /// </summary> 40 Added, 41 42 /// <summary> 43 /// An existing device was removed from the system. This is triggered <em>after</em> the 44 /// device has already been removed, i.e. it already has been cleared from <see cref="InputSystem.devices"/>. 45 /// 46 /// Other than when a device is removed programmatically, this happens when a device 47 /// is unplugged from the system. Subsequent to the notification, the system will remove 48 /// the <see cref="InputDevice"/> instance from its list and remove the device's 49 /// recorded input state. 50 /// 51 /// See also <see cref="InputSystem.RemoveDevice"/>. 52 /// </summary> 53 Removed, 54 55 /// <summary> 56 /// A device reported by the <see cref="IInputRuntime"/> was <see cref="Removed"/> but was 57 /// retained by the system as <see cref="InputSystem.disconnectedDevices">disconnected</see>. 58 /// 59 /// See also <see cref="InputSystem.disconnectedDevices"/>. 60 /// </summary> 61 Disconnected, 62 63 /// <summary> 64 /// A device that was previously retained as <see cref="Disconnected"/> has been re-discovered 65 /// and has been <see cref="Added"/> to the system again. 66 /// 67 /// See also <see cref="InputSystem.disconnectedDevices"/>. 68 /// </summary> 69 Reconnected, 70 71 /// <summary> 72 /// An existing device was re-enabled after having been <see cref="Disabled"/>. 73 /// 74 /// See also <see cref="InputSystem.EnableDevice"/> and <see cref="InputDevice.enabled"/>. 75 /// </summary> 76 Enabled, 77 78 /// <summary> 79 /// An existing device was disabled. 80 /// 81 /// See also <see cref="InputSystem.DisableDevice"/> and <see cref="InputDevice.enabled"/>. 82 /// </summary> 83 Disabled, 84 85 /// <summary> 86 /// The usages on a device have changed. 87 /// 88 /// This may signal, for example, that what was the right hand XR controller before 89 /// is now the left hand controller. 90 /// 91 /// See also <see cref="InputSystem.SetDeviceUsage(InputDevice,string)"/> and 92 /// <see cref="InputControl.usages"/>. 93 /// </summary> 94 UsageChanged, 95 96 /// <summary> 97 /// The configuration of a device has changed. 98 /// 99 /// This may signal, for example, that the layout used by the keyboard has changed or 100 /// that, on a console, a gamepad has changed which player ID(s) it is assigned to. 101 /// 102 /// See also <see cref="DeviceConfigurationEvent"/> and <see cref="InputSystem.QueueConfigChangeEvent"/>. 103 /// </summary> 104 ConfigurationChanged, 105 106 /// <summary> 107 /// Device is being "soft" reset but in a way that excludes <see cref="Layouts.InputControlLayout.ControlItem.dontReset"/> 108 /// controls such as mouse positions. This can happen during application focus changes 109 /// (see <see cref="InputSettings.backgroundBehavior"/>) or when <see cref="InputSystem.ResetDevice"/> 110 /// is called explicitly. 111 /// 112 /// This notification is sent before the actual reset happens. 113 /// </summary> 114 SoftReset, 115 116 /// <summary> 117 /// Device is being "hard" reset, i.e. every control is reset to its default value. This happens only 118 /// when explicitly forced through <see cref="InputSystem.ResetDevice"/>. 119 /// 120 /// This notification is sent before the actual reset happens. 121 /// </summary> 122 HardReset, 123 124 [Obsolete("Destroyed enum has been deprecated.")] 125 Destroyed, 126 } 127}