/// <summary> /// Shows the dialog to the user and asks for input. /// </summary> public void ShowDialog(ProvinceNameCallback callback) { // reset the name provinceNameField.text = ""; this.callback = callback; Show(); }
/// <summary> /// DO NOT CALL. This is called whenever the button is clicked. /// </summary> public void OnNameChosen() { if (callback == null) { return; } // make the callback, then set it to null callback(provinceNameField.text); callback = null; Hide(); }