Disable buttons after click – in progress

Eventually I want to disable buttons after students have done them a lot, but right now I want to just learn how to disable buttons at all.

This thread has a good script thing:

public void BtnOnClick() { gameObject.GetComponent<Button>().interactable = false; }

This too.

I tried :  gameObject.GetComponent<Button>().interactable = false;

Buuuuut it’s not saving it as disabled when it comes back to the StudentMenu, because it’s resetting every time.  Huh.  (Doublechecked by disabling the scene change, and it’s disabling the buttons as long as the scene doesn’t change!  Oof.)

It might be that I need to make a list of all the buttons that should be disabled in the GM, add to it every time a button get clicked, and then apply that to the StudentMenu set up.  #todo – Eventually I’ll change it to only disable buttons once students are doing really well on a thing (or to disable buttons that are too advanced, a la “unlocking” levels).

Also #todo – I need a review / matching game at the end of these things, to really see how things are going. (This has been Drag&Drop-4-26, moving on to Drag&Drop-4-26b to make changes to the GM.) (#to do – match up blog posts to game versions?)

I’m going to leave this one till later – I think it’s more important that I set up exporting the data from the game, because before I put many parameters on how kids can use the game, I need to know what they actually do with it.


Leave a Reply

Your email address will not be published. Required fields are marked *