private void OnOk() { try { activeDialog.callback?.Invoke(true, activeDialog.allowInput ? input.text : null); } catch (Exception e) { Debug.LogException(e); } finally { activeDialog = null; } Hide(); }
private void OnCancel() { try { activeDialog.callback?.Invoke(false, null); } catch (Exception e) { Debug.LogException(e); } finally { activeDialog = null; } Hide(); }
private void ProcessQueue() { if (queue.Count == 0 || canvas.enabled) { return; } activeDialog = queue.Dequeue(); label.text = activeDialog.text; input.gameObject.SetActive(activeDialog.allowInput); input.text = ""; canvas.enabled = true; controller.enabled = false; inputSource.enabled = false; Cursor.lockState = CursorLockMode.None; Cursor.visible = true; }