private IEnumerator Deconnect() { Cursor.lockState = CursorLockMode.None; Cursor.visible = true; yield return(new WaitForSeconds(5f)); var evnt = DisconnectEvent.Create(GlobalTargets.Everyone); evnt.Send(); yield break; }
public static void QueueDisconnectEvent(InputDevice device, double time = -1) { if (device == null) { throw new ArgumentNullException("device"); } if (device.id == InputDevice.kInvalidDeviceId) { throw new InvalidOperationException("Device has not been added"); } if (time < 0) { time = Time.time; } var inputEvent = DisconnectEvent.Create(device.id, time); s_Manager.QueueEvent(ref inputEvent); }