W
W
WasTabon2020-09-09 20:25:14
C++ / C#
WasTabon, 2020-09-09 20:25:14

How can I auto-update text? Or how to get a variable from one method in another?

5f590f8c6419d750381507.png
Here is the shop script, where there are buttons, their price, price text and bonus, since there are a lot of buttons, I stuffed it all into an array and did it in the int index purchase method, which is responsible for the element in the array, but Index applies only to this method , that is, in Start or Update I can’t make it so that the price of the product is written at the start

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-09-09
@firedragon

If some method sets some values. It is worth calling it from other methods.
In general, I did not understand the question, and yes, please make out the code in text form.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question