I’m making a store page for my game, where the player can buy new options etc.
I made a prefab which contains blank spaces for:
- a sprite
- a label (for the price of the option)
- another label (for the description of that option)
Basically each prefab will represent a page that you can scroll right or left, to display next item.
I want to build an array or list which contains the sprite (or a reference to it), an integer (for the price) and a string (for the description) and then I want to instantiate as many prefabs as needed and populate them with the data from my array/list.
How should I go about that?
Which type of array or list should I use?
Is there a better way to achieve that?
Thanks in advance