K
K
K1ald2022-01-25 18:14:56
Unity
K1ald, 2022-01-25 18:14:56

How to implement a shop system in Unity (more details inside)?

Question regarding the implementation of the store in games (in my case 2D).
It is necessary to implement a system:
1) Buy a product.
2) It is selected (replacing the old skin with a new one).
3) We save it so that it is clear that the product has been purchased (so that when choosing a purchased product after another, the purchase of an already purchased product does not occur).

What is the best way to make sure that the purchased product replaces the previous one? Turn off the first and turn on the second prefab, replace the sprite through the code?

I hope I have specified my question sufficiently, otherwise in other chats I was %%%% for the "abstract question" and they advised me to learn how to correctly pose questions.

When you click on the button, a panel with the shop interface is called up.

It needs to happen like this:
There was a loss, we go to the store, buy, and the object sprite changes when we press the restart button and restart the scene.
It would be very cool if you could advise the material where all this is described in detail)
Maybe the material on which you yourself studied?

I watched several videos on YouTube on this topic, including foreign YouTubers on Unity, spent a few days, but in the end none of the methods worked as intended.
Scriptable Object was among those ways.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question