// Creates a button showing the choice text public Button CreateChoiceView(string text) { // Creates the button from a prefab Button choice = Instantiate(buttonPrefab) as Button; choice.transform.SetParent(choiceArea.transform, false); // Gets the text from the button prefab CoolTMP choiceText = choice.GetComponentInChildren <CoolTMP>(); choiceText.text = text; choiceText.nextDialogueBlock.AddListener(() => SetTriangle(choice)); choiceText.textSpeed = textSpeed * 10f; choiceText.ReadText(choiceText.text); return(choice); }
public void UpdateTextArea(CoolTMP coolTMP) { coolTMP.ReadText(dialogueBlock); }