Help! My other buttons(next and all dialogue choice buttons) all work perfectly, but for some reason my Quit button just doesn’t react at all. I even tried deleting it from the prefab and recreating it, and made sure to link it to the serialized field in the Dialogue prefab.
Dialogue UI Code:
void Start()
{
playerConversant = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerConversant>();
playerConversant.onConversationUpdated += UpdateUI;
nextButton.onClick.AddListener(() => playerConversant.Next());
quitButton.onClick.AddListener(() => playerConversant.Quit());
UpdateUI();
}
PlayerConversant Code:
public void Quit()
{
currentDialogue = null;
currentNode = null;
isChoosing = false;
onConversationUpdated();
}