- Home /
This question was
closed Nov 30, 2014 at 06:37 PM by
Kiwasi for the following reason:
Duplicate Question
Question by
WilliamDann · Nov 30, 2014 at 06:14 PM ·
variablecallhow-to
How do i call a variable from another script?
So, in a game i'm working on i have a money system and it is in a script attached to a camera, i also have a onTrigger event that takes money away. But i don't know how to call the money variable to the trigger script. i'm new at this and i need a more spoon-fed explanation.
Thanks, Willosoft Dev. Team
Comment
Answer by YoungDeveloper · Nov 30, 2014 at 06:14 PM
I explain it very clearly in these two topics.
http://answers.unity3d.com/questions/550578/cant-understand-getcomponent-c.html
http://answers.unity3d.com/questions/597617/how-do-i-addsubtract-variables-between-two-differe.html