コード例 #1
0
        public static void SwitchToCinematic()
        {
            RemoteCommand cmd = new RemoteCommand {
                Command = "EnableCinematicMode"
            };

            SendCommand(cmd);
        }
コード例 #2
0
        public static void PowerOnHeadset()
        {
            RemoteCommand cmd = new RemoteCommand {
                Command = "HeadsetOn"
            };

            SendCommand(cmd);
        }
コード例 #3
0
        public static void SwitchToVR()
        {
            RemoteCommand cmd = new RemoteCommand {
                Command = "EnableVRMode"
            };

            SendCommand(cmd);
        }
コード例 #4
0
        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();
        }