public static void SwitchToCinematic() { RemoteCommand cmd = new RemoteCommand { Command = "EnableCinematicMode" }; SendCommand(cmd); }
public static void PowerOnHeadset() { RemoteCommand cmd = new RemoteCommand { Command = "HeadsetOn" }; SendCommand(cmd); }
public static void SwitchToVR() { RemoteCommand cmd = new RemoteCommand { Command = "EnableVRMode" }; SendCommand(cmd); }
private static void SendCommand(RemoteCommand Command) { string ser = JsonConvert.SerializeObject(Command); byte[] data = Encoding.UTF8.GetBytes(ser); var ep = new IPEndPoint(IPAddress.Parse("255.255.255.255"), 14598); var client = new UdpClient(); client.EnableBroadcast = true; client.Send(data, data.Length, ep); client.Close(); }