void OnDestroy() { if (port == "") { return; } Debug.Log ("Closing port " + port); ClosePort (port); }