void OnDisable()
        {
            // When object is deselected in Edit Mode then we stop listening.
            if (!Application.isPlaying && _oscIn.isOpen)
            {
                _oscIn.Close();
            }

            // Unsubscribe from messsages.
            OscEditorUI.RemoveInspectorMessageListener(_oscIn, OnOSCMessage, ref _inspectorMessageEventObject);
        }
        void OnDisable()
        {
            // When object is deselected in Edit Mode then we stop listening.
            if (!Application.isPlaying && _oscIn.isOpen)
            {
                _oscIn.Close();
            }

            // Unsubscribe from messsages.
            _oscIn.UnmapAnyMessage(OnOSCMessage);
        }
예제 #3
0
        void OnDisable()
        {
            // When object is deselected in Edit Mode then we stop listening
            if (!Application.isPlaying && oscIn.isOpen)
            {
                oscIn.Close();
            }

            // Unsubscribe from messsages
            oscIn.onAnyMessage.RemoveListener(OnOSCMessage);
        }
예제 #4
0
 void OnOpenChanged(bool on)
 {
     if (on)
     {
         Open(_port, _mode, _multicastAddress);
     }
     else
     {
         oscIn.Close();
     }
 }
예제 #5
0
 void OnApplicationQuit()
 {
     if (oscReceive.isOpen)
     {
         oscReceive.Close();
     }
     if (oscSend.isOpen)
     {
         oscSend.Close();
     }
 }
예제 #6
0
        protected override void OnStop()
        {
            foreach (var plugin in Plugins)
            {
                plugin.HostShutdown();
            }

            MidiIn?.Close();
            MidiIn?.Dispose();

            OscOut?.Close();
            OscOut?.Dispose();

            OscIn?.Close();
            OscIn?.Dispose();
        }
예제 #7
0
        void OnAuthorized()
        {
            oscIn.Close();
            oscOut.Open(generalMagnager.PORT_MAINRCV, generalMagnager.mainHostAddress);
            generalMagnager.myRobotID = robotID;
            // name resolve
            generalMagnager.myRobotHostName = robotHostName;
            var hostAddresses = Dns.GetHostAddresses(robotHostName);

            foreach (var ipAddress in hostAddresses)
            {
                if (ipAddress.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
                {
                    generalMagnager.myRobotAddress = ipAddress.ToString();
                    break;
                }
            }
            _authDataText.text = "robotID: " + robotID + " robotHostName: " + robotHostName;
            _startButton.OnAuthorized();
            stream.Dispose();
        }