/// <summary> /// Sends "OnTextChange(text)" to the dialogue UI GameObject. /// </summary> /// <param name="text"></param> public static void SendTextChangeMessage(UnityEngine.UI.Text text) { if (text == null) { return; } if (dialogueUI == null) { dialogueUI = text.GetComponentInParent <UnityUIDialogueUI>(); } if (dialogueUI == null) { return; } dialogueUI.SendMessage("OnTextChange", text, SendMessageOptions.DontRequireReceiver); }