private void PrintDialogueToString() { // print dialogue nameTxtBox.text = nextMessage.name; dialogueTextBox.text = nextMessage.dialogue; // print choices if there are any and stop advancement if (nextMessage.choices != null && nextMessage.choices.Count > 0) { // enable choices and top advance choicesOpen = true; for (int i = 0; i < nextMessage.choices.Count; i++) { choiceButtons[i].gameObject.SetActive(true); choiceButtonsText[i].text = nextMessage.choices[i].optionText; } } else if (nextMessage.next != null) { // advance cursor. choicesOpen = false; nextMessage = nextMessage.next; } else if (nextMessage.endAction != null) { nextMessage.endAction(); } else { //you f****d up if you are here. } }