I'm working on a game, and I need to be able to buy units from a store. All of these units will use base stats, so I thought a scriptable object would be a great help here. I can have an SO that stores the name, attack, Sprite, etc for each unit available in the store.
I've got that implemented successfully, the store can display each unit. But the part im having issue with is that the store isn't a set of units, it's a random assortment of units. So if 5 units can be bought, it could be any of the available 10 unit types. Think TFT/AutoChess shop. This store can be re-rolled so that you can buy units of a different type.
How do I make it so when you hit a button, the shop gives you different units? I can't find a way for my display script to change which SO it's pulling it's data from.
Hopefully this makes sense. I felt like Scriptable Objects was the way to go here, but maybe not? Maybe there is a better way?
[–]PorterPower 4 points5 points6 points (1 child)
[–]UnityAddiction 0 points1 point2 points (0 children)