Beispiel #1
0
        public static void Transmitted(OSCTransmitter transmitter, OSCPacket packet)
        {
            var consolePacket = new OSCConsolePacket();

            consolePacket.Info       = string.Format("Transmitter: {0}:{1}", transmitter.RemoteHost, transmitter.RemotePort);
            consolePacket.PacketType = OSCConsolePacketType.Transmitted;
            consolePacket.Packet     = packet;

            Log(consolePacket);
        }
Beispiel #2
0
        public static void Transmitted(OSCTransmitter transmitter, IOSCPacket packet)
        {
            var consolePacket = new OSCConsolePacket();

            consolePacket.Info       = $"Transmitter: {transmitter.RemoteHost}:{transmitter.RemotePort}";
            consolePacket.PacketType = OSCConsolePacketType.Transmitted;
            consolePacket.Packet     = packet;

            Log(consolePacket);
        }
Beispiel #3
0
        public static void Transmitted(OSCTransmitter transmitter, IOSCPacket packet)
        {
            var consolePacket = new OSCConsolePacket();

            consolePacket.Info       = $"Transmitter: {transmitter.RemoteHost}:{transmitter.RemotePort}";
            consolePacket.TimeStamp  = DateTime.Now.ToString("[HH:mm:ss]");
            consolePacket.PacketType = OSCConsolePacketType.Transmitted;
            consolePacket.Packet     = packet;

            Log(consolePacket);
        }
Beispiel #4
0
        public static void Received(OSCReceiver receiver, IOSCPacket packet)
        {
            var ip = packet.Ip != null ? $"{packet.Ip}:{packet.Port}" : "Debug";

            var consolePacket = new OSCConsolePacket();

            consolePacket.Info       = $"Receiver: {receiver.LocalPort}. From: {ip}";
            consolePacket.PacketType = OSCConsolePacketType.Received;
            consolePacket.Packet     = packet;

            Log(consolePacket);
        }
Beispiel #5
0
        public static void Received(OSCReceiver receiver, OSCPacket packet)
        {
            var ip = packet.Ip != null?string.Format("{0}:{1}", packet.Ip, packet.Port) : "Debug";

            var consolePacket = new OSCConsolePacket();

            consolePacket.Info       = string.Format("Receiver: {0}. From: {1}", receiver.LocalPort, ip);
            consolePacket.PacketType = OSCConsolePacketType.Received;
            consolePacket.Packet     = packet;

            Log(consolePacket);
        }
Beispiel #6
0
        public static void Received(OSCReceiver receiver, IOSCPacket packet)
        {
            var ip = packet.Ip != null ? $"{packet.Ip}:{packet.Port}" : "Debug";

            var consolePacket = new OSCConsolePacket();

            consolePacket.Info       = $"Receiver: {receiver.LocalPort}. From: {ip}";
            consolePacket.TimeStamp  = DateTime.Now.ToString("[HH:mm:ss]");
            consolePacket.PacketType = OSCConsolePacketType.Received;
            consolePacket.Packet     = packet;

            Log(consolePacket);
        }
Beispiel #7
0
        private static void Log(OSCConsolePacket consolePacket)
        {
#if UNITY_EDITOR
            // COPY PACKET
            consolePacket.Packet = consolePacket.Packet.Copy();

            ConsoleBuffer.Add(consolePacket);
#else
            if (LogConsole)
            {
                UnityEngine.Debug.Log($"[OSCConsole] Packed {consolePacket.PacketType}: {consolePacket.Packet}");
            }
#endif
        }
Beispiel #8
0
        private static void Log(OSCConsolePacket consolePacket)
        {
#if UNITY_EDITOR
            // COPY PACKET
            consolePacket.Packet = consolePacket.Packet.Copy();

            _consoleBuffer.Add(consolePacket);
#else
            if (_logConsole)
            {
                UnityEngine.Debug.LogFormat("[OSCConsole] Packed {0}: {1}", consolePacket.PacketType, consolePacket.Packet);
            }
#endif
        }