IEnumerator Open(Dialog.InputData input) { var ins = Instantiate(_dialogPrefab); if (_dialogRoot != null) { ins.transform.parent = _dialogRoot; ins.transform.localPosition = Vector3.zero; } ins.Init(input); _dialogStack.Add(ins); Debug.Log("[ DialogSingleton ]WaitForClose"); yield return(ins.WaitForClose()); Debug.Log("[ DialogSingleton ]Close"); _dialogStack.Remove(ins); Destroy(ins.gameObject); }
public static void OpenModeless(Dialog.InputData input) { Instance.StartCoroutine(Instance.Open(input)); }
public static IEnumerator OpenModal(Dialog.InputData input) { yield return(Instance.Open(input)); }