Good day, I had the task to make an in-game store on Unity a new UI. The problem is that each product has 3 types of panels,

  1. Item purchased
  2. Item closed
  3. Goods can be bought, the price is written there.

Also, before you buy a product, a panel appears where it says: "Are you sure that you want to buy a product?" "Price of goods", "His icon". Also buy button and go back. And yes, I need to save the whole thing when leaving, so that if a person bought a product, he appeared in the "room" and when he left the game and went back, it all loaded and showed that the product was purchased and he is in the "room", well then I thought to do everything through PlayerPreffs, but damn a lot of variables.

A little on the account of the fact that the goods are closed, we are validating where the player’s lvl is checked and the goods seem to be open or closed.

The problem is that I don’t know how to customize everything and do everything. Okay, the product is for 10 units, then there are still norms there can be done through SetActive. And here I do not know (

Vobschem, I ask for your help, although I’m pushing for a thought, because I don’t know what to do better (and I don’t even want to show the crutches that I wrote

  • 2
    Product class: contains pictures for the states, price, status (open / closed), and availability status (purchased / not purchased). When loading a store, we call the product designer, where we transfer its data + user data (level, characteristics). The designer forms the display of goods on the counter (open, closed, etc.). Well, the methods of "open / close", "buy", etc. Conceptually, everything is decided through the class. You can still listeners in the class to put for the player's object - if the properties of the player change - the properties of the goods change - becomes "open" for example. - DimXenon

0