scripts
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x02000398 RID: 920
|
||||
[StructLayout(LayoutKind.Explicit, Size = 32)]
|
||||
public struct NativeClickEvent
|
||||
{
|
||||
// Token: 0x04000C54 RID: 3156
|
||||
[FieldOffset(0)]
|
||||
public NativeInputEvent baseEvent;
|
||||
|
||||
// Token: 0x04000C55 RID: 3157
|
||||
[FieldOffset(20)]
|
||||
public bool isPressed;
|
||||
|
||||
// Token: 0x04000C56 RID: 3158
|
||||
[FieldOffset(24)]
|
||||
public int controlIndex;
|
||||
|
||||
// Token: 0x04000C57 RID: 3159
|
||||
[FieldOffset(28)]
|
||||
public int clickCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x0200039F RID: 927
|
||||
// (Invoke) Token: 0x06003662 RID: 13922
|
||||
public delegate void NativeDeviceDiscoveredCallback(NativeInputDeviceInfo deviceInfo);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x0200039E RID: 926
|
||||
// (Invoke) Token: 0x0600365E RID: 13918
|
||||
public delegate void NativeEventCallback(int eventCount, IntPtr eventData);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x02000395 RID: 917
|
||||
[StructLayout(LayoutKind.Explicit, Size = 36)]
|
||||
public struct NativeGenericEvent
|
||||
{
|
||||
// Token: 0x04000C45 RID: 3141
|
||||
[FieldOffset(0)]
|
||||
public NativeInputEvent baseEvent;
|
||||
|
||||
// Token: 0x04000C46 RID: 3142
|
||||
[FieldOffset(20)]
|
||||
public int controlIndex;
|
||||
|
||||
// Token: 0x04000C47 RID: 3143
|
||||
[FieldOffset(24)]
|
||||
public int rawValue;
|
||||
|
||||
// Token: 0x04000C48 RID: 3144
|
||||
[FieldOffset(28)]
|
||||
public double scaledValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x0200039B RID: 923
|
||||
[Serializable]
|
||||
public struct NativeInputDeviceInfo
|
||||
{
|
||||
// Token: 0x04000C63 RID: 3171
|
||||
public int deviceId;
|
||||
|
||||
// Token: 0x04000C64 RID: 3172
|
||||
public string deviceDescriptor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x02000394 RID: 916
|
||||
[StructLayout(LayoutKind.Explicit, Size = 20)]
|
||||
public struct NativeInputEvent
|
||||
{
|
||||
// Token: 0x04000C41 RID: 3137
|
||||
[FieldOffset(0)]
|
||||
public NativeInputEventType type;
|
||||
|
||||
// Token: 0x04000C42 RID: 3138
|
||||
[FieldOffset(4)]
|
||||
public int sizeInBytes;
|
||||
|
||||
// Token: 0x04000C43 RID: 3139
|
||||
[FieldOffset(8)]
|
||||
public int deviceId;
|
||||
|
||||
// Token: 0x04000C44 RID: 3140
|
||||
[FieldOffset(12)]
|
||||
public double time;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x02000393 RID: 915
|
||||
public enum NativeInputEventType
|
||||
{
|
||||
// Token: 0x04000C35 RID: 3125
|
||||
DeviceConnected = 1145261902,
|
||||
// Token: 0x04000C36 RID: 3126
|
||||
DeviceDisconnected = 1145325907,
|
||||
// Token: 0x04000C37 RID: 3127
|
||||
Generic = 1195724370,
|
||||
// Token: 0x04000C38 RID: 3128
|
||||
KeyDown = 1262836036,
|
||||
// Token: 0x04000C39 RID: 3129
|
||||
KeyUp = 1262836053,
|
||||
// Token: 0x04000C3A RID: 3130
|
||||
PointerDown = 1347703364,
|
||||
// Token: 0x04000C3B RID: 3131
|
||||
PointerMove = 1347703373,
|
||||
// Token: 0x04000C3C RID: 3132
|
||||
PointerUp = 1347703381,
|
||||
// Token: 0x04000C3D RID: 3133
|
||||
PointerCancelled = 1347703363,
|
||||
// Token: 0x04000C3E RID: 3134
|
||||
Click = 1129072971,
|
||||
// Token: 0x04000C3F RID: 3135
|
||||
Text = 1413830740,
|
||||
// Token: 0x04000C40 RID: 3136
|
||||
Tracking = 1414677323
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x020003A0 RID: 928
|
||||
public sealed class NativeInputSystem
|
||||
{
|
||||
// Token: 0x06003666 RID: 13926 RVA: 0x0005B250 File Offset: 0x00059450
|
||||
[RequiredByNativeCode]
|
||||
internal static void NotifyUpdate(NativeInputUpdateType updateType)
|
||||
{
|
||||
NativeUpdateCallback nativeUpdateCallback = NativeInputSystem.onUpdate;
|
||||
if (nativeUpdateCallback != null)
|
||||
{
|
||||
nativeUpdateCallback(updateType);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06003667 RID: 13927 RVA: 0x0005B274 File Offset: 0x00059474
|
||||
[RequiredByNativeCode]
|
||||
internal static void NotifyEvents(int eventCount, IntPtr eventData)
|
||||
{
|
||||
NativeEventCallback nativeEventCallback = NativeInputSystem.onEvents;
|
||||
if (nativeEventCallback != null)
|
||||
{
|
||||
nativeEventCallback(eventCount, eventData);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06003668 RID: 13928 RVA: 0x0005B298 File Offset: 0x00059498
|
||||
[RequiredByNativeCode]
|
||||
internal static bool HasDeviceDiscoveredHandler()
|
||||
{
|
||||
return NativeInputSystem.onDeviceDiscovered != null;
|
||||
}
|
||||
|
||||
// Token: 0x06003669 RID: 13929 RVA: 0x0005B2B8 File Offset: 0x000594B8
|
||||
[RequiredByNativeCode]
|
||||
internal static void NotifyDeviceDiscovered(NativeInputDeviceInfo deviceInfo)
|
||||
{
|
||||
NativeDeviceDiscoveredCallback nativeDeviceDiscoveredCallback = NativeInputSystem.onDeviceDiscovered;
|
||||
if (nativeDeviceDiscoveredCallback != null)
|
||||
{
|
||||
nativeDeviceDiscoveredCallback(deviceInfo);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000C92 RID: 3218
|
||||
// (get) Token: 0x0600366A RID: 13930
|
||||
public static extern double zeroEventTime
|
||||
{
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x0600366B RID: 13931
|
||||
[ThreadAndSerializationSafe]
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern void SendInput(ref NativeInputEvent inputEvent);
|
||||
|
||||
// Token: 0x0600366C RID: 13932
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern string GetDeviceConfiguration(int deviceId);
|
||||
|
||||
// Token: 0x0600366D RID: 13933
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public static extern string GetControlConfiguration(int deviceId, int controlIndex);
|
||||
|
||||
// Token: 0x0600366E RID: 13934 RVA: 0x0005B2DC File Offset: 0x000594DC
|
||||
public static void SetPollingFrequency(float hertz)
|
||||
{
|
||||
if (hertz < 1f)
|
||||
{
|
||||
throw new ArgumentException("Polling frequency cannot be less than 1Hz");
|
||||
}
|
||||
NativeInputSystem.SetPollingFrequencyInternal(hertz);
|
||||
}
|
||||
|
||||
// Token: 0x0600366F RID: 13935
|
||||
[GeneratedByOldBindingsGenerator]
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern void SetPollingFrequencyInternal(float hertz);
|
||||
|
||||
// Token: 0x04000C6E RID: 3182
|
||||
public static NativeUpdateCallback onUpdate;
|
||||
|
||||
// Token: 0x04000C6F RID: 3183
|
||||
public static NativeEventCallback onEvents;
|
||||
|
||||
// Token: 0x04000C70 RID: 3184
|
||||
public static NativeDeviceDiscoveredCallback onDeviceDiscovered;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x0200039C RID: 924
|
||||
public enum NativeInputUpdateType
|
||||
{
|
||||
// Token: 0x04000C66 RID: 3174
|
||||
BeginFixed,
|
||||
// Token: 0x04000C67 RID: 3175
|
||||
EndFixed,
|
||||
// Token: 0x04000C68 RID: 3176
|
||||
BeginDynamic,
|
||||
// Token: 0x04000C69 RID: 3177
|
||||
EndDynamic,
|
||||
// Token: 0x04000C6A RID: 3178
|
||||
BeginBeforeRender,
|
||||
// Token: 0x04000C6B RID: 3179
|
||||
EndBeforeRender,
|
||||
// Token: 0x04000C6C RID: 3180
|
||||
BeginEditor,
|
||||
// Token: 0x04000C6D RID: 3181
|
||||
EndEditor
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x02000396 RID: 918
|
||||
[StructLayout(LayoutKind.Explicit, Size = 24)]
|
||||
public struct NativeKeyEvent
|
||||
{
|
||||
// Token: 0x04000C49 RID: 3145
|
||||
[FieldOffset(0)]
|
||||
public NativeInputEvent baseEvent;
|
||||
|
||||
// Token: 0x04000C4A RID: 3146
|
||||
[FieldOffset(20)]
|
||||
public KeyCode key;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x02000397 RID: 919
|
||||
[StructLayout(LayoutKind.Explicit, Size = 80)]
|
||||
public struct NativePointerEvent
|
||||
{
|
||||
// Token: 0x04000C4B RID: 3147
|
||||
[FieldOffset(0)]
|
||||
public NativeInputEvent baseEvent;
|
||||
|
||||
// Token: 0x04000C4C RID: 3148
|
||||
[FieldOffset(20)]
|
||||
public int pointerId;
|
||||
|
||||
// Token: 0x04000C4D RID: 3149
|
||||
[FieldOffset(24)]
|
||||
public Vector3 position;
|
||||
|
||||
// Token: 0x04000C4E RID: 3150
|
||||
[FieldOffset(36)]
|
||||
public Vector3 delta;
|
||||
|
||||
// Token: 0x04000C4F RID: 3151
|
||||
[FieldOffset(48)]
|
||||
public float pressure;
|
||||
|
||||
// Token: 0x04000C50 RID: 3152
|
||||
[FieldOffset(52)]
|
||||
public float twist;
|
||||
|
||||
// Token: 0x04000C51 RID: 3153
|
||||
[FieldOffset(56)]
|
||||
public Vector2 tilt;
|
||||
|
||||
// Token: 0x04000C52 RID: 3154
|
||||
[FieldOffset(64)]
|
||||
public Vector3 radius;
|
||||
|
||||
// Token: 0x04000C53 RID: 3155
|
||||
[FieldOffset(76)]
|
||||
public int displayIndex;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x02000399 RID: 921
|
||||
[StructLayout(LayoutKind.Explicit, Size = 24)]
|
||||
public struct NativeTextEvent
|
||||
{
|
||||
// Token: 0x04000C58 RID: 3160
|
||||
[FieldOffset(0)]
|
||||
public NativeInputEvent baseEvent;
|
||||
|
||||
// Token: 0x04000C59 RID: 3161
|
||||
[FieldOffset(20)]
|
||||
public int utf32Character;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x0200039A RID: 922
|
||||
[StructLayout(LayoutKind.Explicit, Size = 104)]
|
||||
public struct NativeTrackingEvent
|
||||
{
|
||||
// Token: 0x04000C5A RID: 3162
|
||||
[FieldOffset(0)]
|
||||
public NativeInputEvent baseEvent;
|
||||
|
||||
// Token: 0x04000C5B RID: 3163
|
||||
[FieldOffset(20)]
|
||||
public int nodeId;
|
||||
|
||||
// Token: 0x04000C5C RID: 3164
|
||||
[FieldOffset(24)]
|
||||
public uint availableFields;
|
||||
|
||||
// Token: 0x04000C5D RID: 3165
|
||||
[FieldOffset(28)]
|
||||
public Vector3 localPosition;
|
||||
|
||||
// Token: 0x04000C5E RID: 3166
|
||||
[FieldOffset(40)]
|
||||
public Quaternion localRotation;
|
||||
|
||||
// Token: 0x04000C5F RID: 3167
|
||||
[FieldOffset(56)]
|
||||
public Vector3 velocity;
|
||||
|
||||
// Token: 0x04000C60 RID: 3168
|
||||
[FieldOffset(68)]
|
||||
public Vector3 angularVelocity;
|
||||
|
||||
// Token: 0x04000C61 RID: 3169
|
||||
[FieldOffset(80)]
|
||||
public Vector3 acceleration;
|
||||
|
||||
// Token: 0x04000C62 RID: 3170
|
||||
[FieldOffset(92)]
|
||||
public Vector3 angularAcceleration;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngineInternal.Input
|
||||
{
|
||||
// Token: 0x0200039D RID: 925
|
||||
// (Invoke) Token: 0x0600365A RID: 13914
|
||||
public delegate void NativeUpdateCallback(NativeInputUpdateType updateType);
|
||||
}
|
||||
Reference in New Issue
Block a user