public static void SetPollingFrequency(float hertz) { if (hertz < 1f) { throw new ArgumentException("Polling frequency cannot be less than 1Hz"); } NativeInputSystem.SetPollingFrequencyInternal(hertz); }
public static bool SendOutput <TOutputEvent>(int deviceId, int type, TOutputEvent outputEvent) where TOutputEvent : struct { return(NativeInputSystem.SendOutput(deviceId, type, UnsafeUtility.SizeOf <TOutputEvent>(), UnsafeUtility.AddressOf <TOutputEvent>(ref outputEvent))); }
public static void QueueInputEvent <TInputEvent>(ref TInputEvent inputEvent) where TInputEvent : struct { NativeInputSystem.QueueInputEvent((IntPtr)UnsafeUtility.AddressOf <TInputEvent>(ref inputEvent)); }
public static void SendInput <TInputEvent>(TInputEvent inputEvent) where TInputEvent : struct { NativeInputSystem.SendInput(UnsafeUtility.AddressOf <TInputEvent>(ref inputEvent)); }