A game about forced loneliness, made by TACStudios
1#if UNITY_EDITOR
2using UnityEngine.InputSystem.LowLevel;
3
4namespace UnityEngine.InputSystem.Editor
5{
6 internal class InputDiagnostics : IInputDiagnostics
7 {
8 public void OnCannotFindDeviceForEvent(InputEventPtr eventPtr)
9 {
10 Debug.LogError("Cannot find device for input event: " + eventPtr);
11 }
12
13 public void OnEventTimestampOutdated(InputEventPtr eventPtr, InputDevice device)
14 {
15 Debug.LogError(
16 $"'{eventPtr.type}' input event {eventPtr.id} for device '{device}' is outdated (event time: {eventPtr.time}, device time: {device.lastUpdateTime})");
17 }
18
19 public void OnEventFormatMismatch(InputEventPtr eventPtr, InputDevice device)
20 {
21 Debug.LogError(
22 $"'{eventPtr.type}' input event {eventPtr.id} for device '{device}' has incorrect format (event format: '{eventPtr.type}', device format: '{device.stateBlock.format}')");
23 }
24
25 public void OnEventForDisabledDevice(InputEventPtr eventPtr, InputDevice device)
26 {
27 Debug.LogError($"Device '{device}' received input event '{eventPtr}' but the device is disabled");
28 }
29 }
30}
31#endif // UNITY_EDITOR