/// <summary> /// Cleanup on component destroy. /// </summary> private void OnDestroy() { Stop(); if (_radioMetricsLibrary != null) { _radioMetricsLibrary.Dispose(); _radioMetricsLibrary = null; } }
private void Start() { if (Network == null) { Debug.LogError("Device Network is null"); this.enabled = false; return; } _radioMetricsLibrary = Antilatency.RadioMetrics.Library.load(); if (_radioMetricsLibrary == null) { Debug.LogError("Failed to get RadioMetrics ILibrary"); this.enabled = false; return; } Network.DeviceNetworkChanged.AddListener(OnDeviceNetworkChanged); UpdateUsbSocketsLists(); }