private void OnDisable() { RosSocket socket = GetComponent <RosConnector>().RosSocket; if (subscription_id != null && socket != null) { socket.Unsubscribe(subscription_id); } }