Answer the question
In order to leave comments, you need to log in
How can I pass a value from another script to another script?
I have 2 scripts. The first PlayerLogic is responsible for the logic (hp, damage, etc.). The second PlayerUI is a GUI script. In the first script, for example, there is public int health = 100; and in the second I want to pass the value of health to display hp on the GUI; How can I do it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question