C# - JS problem.
In C# i can do public class (Name) : (score)
That's how I can transfer over my score from the Score script to another script in C#. How would I do that in Javascript?
Please let me know as soon as possible. Thank You!
Comment
Answer by andrei2699 · Jul 28, 2016 at 05:06 PM
In Javascript the default access modifier is public. So you can access the variable from another script by calling
GetComponent(MyClass).MyVar;
Your answer
Follow this Question
Related Questions
Need help to put together 2 scripts 0 Answers
Making an enemy ship chase player in unity3d. 1 Answer
Object to Waypoint script. 1 Answer
Score won't work 1 Answer
addComponent c# script by java 0 Answers