Upgrade buttons
Hello everyone
Im currently working on a small prototype for an idle game, and i want to have a panel with upgrades. I dont want the upgrades to be visible when not unlocked, and i want to have certain criteria unlock certain upgrades. I know how to make the unlocking work, but i dont know how to go about displaying the unlocked upgrades. When an upgrade is bought, its icon disappears and the other upgrades slide in to take its place, forming sort of an upgrade queue. I simply dont know how to do this. If anyone could point me in the right direction, i would greatly appreciate it.
Cheers
Answer by $$anonymous$$ · Apr 14, 2016 at 09:21 PM
I would suggest to use a HorizontalOrVerticalLayoutGroup. You can add a list of "upgrades" to this group and they will automatically be filled and ordered in your group according to your settings. When you remove one out of the list the rest is automatically reordered. A tutorial how to use a HorizontalOrVerticalLayoutGroup is made by Unity: https://www.youtube.com/watch?v=DAdW_K44Dao
Good luck.
I had no idea anything like this existed. I can't try it right now, but it definitely seems like the the thing i need. Thank you!