/// <summary> /// Confirm deletion /// </summary> public void OnDialogConfirmBtnClicked() { if (model.mapData.Length > 1) { model.RemoveRouteByIndex(model.currentRouteIndex); pathDropdown.options.RemoveAt(model.currentRouteIndex); model.currentRouteIndex = 0; pathDropdown.value = model.currentRouteIndex; pathDropdown.RefreshShownValue(); DisplayCurrentRoute(); } else { alert.SetInfo("", "需要有兩條以上路徑才能進行刪除"); alert.show(); } }