- Home /
How i "import" variables?
how i can use vars of a script in other script? Thanks.
Answer by Graham-Dunnett · Nov 21, 2011 at 11:00 PM
This page:
http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Components.html
tells you how you can access one script from another. Once you have a reference to a script, you can access variables it contains using the regular dot notation, like someScript.DoSomething ();
Answer by jahroy · Nov 21, 2011 at 11:00 PM
I recommend looking at this page:
http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Objects.html
Unity has a ton of helpful documentation. Don't be afraid to check it out!
Your answer
Follow this Question
Related Questions
Change Automatic to Semi-Automatic 1 Answer
Import Componet ( Variable ) Error Unexpected Token 3 Answers
GameManager trying to access method from deleted GameManager via the InvokeRepeating() function 0 Answers
Weapon Shake 2 Answers
How can you hide variables within a region in a c# script? 1 Answer