// // UI Event Methods // private void OnSelectedLayerChanged(int value) { ClearAllUserChanges(); if (layerDropdown.options.Count > 0) { networkLayerName = layerDropdown.options[value].text; } else { networkLayerName = null; } if (networkLayer != null && networkLayer.Name != networkLayerName) { // Disable patches visibility events networkLayer.OnPatchVisibilityChange -= OnPatchVisibilityChange; if (dataLayers.IsLayerActive(networkLayer)) { dataLayers.ActivateLayer(networkLayer, false); } networkLayer = null; } PrepareNetworkLayer(); }