Button.OnClick Only Works Once.
I have a button that works the first time I click it, and only the first time. I click it and it changes the text and button text properly, but then the button doesn't do anything after. I know it sees that I'm clicking it, because the highlight works. I have a function that adds listeners that's called in void Start, it looks like this: void ButtonInit() { Choice1.onClick.AddListener(OnClick1); Choice2.onClick.AddListener(OnClick2); Choice3.onClick.AddListener(OnClick3); }
and I have the function for changing the button text setup identically to another text adventure type game I did, where I used key presses, instead of UI Buttons. It looks like this: (there's more components, but they're empty right now as I try to figure this out with 3 stages)
public void OnClick1() { if (PresStage == Stages.Begin) { PresStage = Stages.Tape_Overview; } else if (PresStage == Stages.Tape_Overview) { PresStage = Stages.Rec1; }
The "Stages." is an array housing my various stages of the text adventure and "PresStage" is a variable to carry the current (or Present) stage. Any help or pointers would be appreciated, this is my first time with UI buttons.