private void CleanupConnector(bool destroy) { if (connector != null) { connector.OnControllerConnected -= OnControllerConnected; connector.OnControllerDisconnected -= OnControllerDisconnected; if (destroy) { connector.Destroy(); } connector = null; } }