public void OpenPrompt(PromptWindowAction confirmAction, PromptWindowAction cancelAction, string title, string content) { gameObject.SetActive(true); titleText.text = title; contentText.text = content; confirm += confirmAction; cancel += cancelAction; }
void ClearAction() { foreach (Delegate d in confirm.GetInvocationList()) { confirm -= (PromptWindowAction)d; } foreach (Delegate d in cancel.GetInvocationList()) { cancel -= (PromptWindowAction)d; } }