public NativeInputDeviceManager() { attachedDevices = new List <NativeInputDevice>(); detachedDevices = new List <NativeInputDevice>(); systemDeviceProfiles = new List <NativeInputDeviceProfile>(NativeInputDeviceProfileList.Profiles.Length); customDeviceProfiles = new List <NativeInputDeviceProfile>(); AddSystemDeviceProfiles(); var options = new NativeInputOptions(); options.enableXInput = InputManager.NativeInputEnableXInput; options.preventSleep = InputManager.NativeInputPreventSleep; if (InputManager.NativeInputUpdateRate > 0) { options.updateRate = (UInt16)InputManager.NativeInputUpdateRate; } else { options.updateRate = (UInt16)Mathf.FloorToInt(1.0f / Time.fixedDeltaTime); } Native.Init(options); }
public NativeInputDeviceManager() { attachedDevices = new List <NativeInputDevice>(); detachedDevices = new List <NativeInputDevice>(); systemDeviceProfiles = new List <NativeInputDeviceProfile>(NativeInputDeviceProfileList.Profiles.Length); customDeviceProfiles = new List <NativeInputDeviceProfile>(); deviceEvents = new uint[32]; AddSystemDeviceProfiles(); NativeInputOptions options = new NativeInputOptions { enableXInput = InputManager.NativeInputEnableXInput, preventSleep = InputManager.NativeInputPreventSleep }; if (InputManager.NativeInputUpdateRate != 0) { options.updateRate = (ushort)InputManager.NativeInputUpdateRate; } else { options.updateRate = (ushort)Mathf.FloorToInt(1f / Time.fixedDeltaTime); } Native.Init(options); }
public static void Init(NativeInputOptions options) { }
public static extern void Init(NativeInputOptions options);
public static void Init(NativeInputOptions options) { SetDebugPrintFunc(OnDebugPrint); Init(OnDeviceAttached, OnDeviceDetached, options); }
static extern void Init(DeviceAttachedCallback deviceAttached, DeviceDetachedCallback deviceDetached, NativeInputOptions options);