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); }
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); }
void OnOpenChanged(bool on) { if (on) { Open(_port, _mode, _multicastAddress); } else { oscIn.Close(); } }
void OnApplicationQuit() { if (oscReceive.isOpen) { oscReceive.Close(); } if (oscSend.isOpen) { oscSend.Close(); } }
protected override void OnStop() { foreach (var plugin in Plugins) { plugin.HostShutdown(); } MidiIn?.Close(); MidiIn?.Dispose(); OscOut?.Close(); OscOut?.Dispose(); OscIn?.Close(); OscIn?.Dispose(); }
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(); }