How would I go about accessing variables in another script? I tried this:
But Unity gave me this error:
The name OtherScript does not denote a valid type
Why? It seems perfectly valid to me! Any help appreciated, because I'm totally stuck with a script that should work, that's not working. Thanks in advance...
asked Mar 22 '10 at 11:11 PM
"OtherScript" is the name of your other script. You don't literally type OtherScript unless your other script is actually and for real called OtherScript.js. Otherwise you use the script name. It will show up in the inspector once you fix any errors you have.
answered Mar 23 '10 at 02:18 AM
From the Unity Scripting Reference:
answered Mar 23 '10 at 02:12 AM