public void OnMergeLayer(InputField inputField) { string oldLayerName = modifyLayer.LayerName; string mergeLayerName = inputField.text; if (!string.IsNullOrEmpty(mergeLayerName)) { if (mapLayers.MergeLayer(modifyLayer.LayerName, mergeLayerName)) { removeLayerUI(oldLayerName); if (selectLayers == oldLayerName) { selectLayers = mergeLayerName; } } } OnCloseModifyPanelBtnClicked(); }