Global variables/functions in JavaScript

Hi, i am searching information about Global variables. How to define them and how to access them. And is it possible to define global functions ?

There should probably be a reference section on this because I’m trying to find out mostly the same thing. I’ve read all reference material this week and I don’t remember seeing anything about these things.

http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Objects.html

–Eric

http://unity3d.com/support/documentation/ScriptReference/index.Member_Variables_26_Global_Variables.html

Slightly unrelated, is anyone else besides me irked at how static members and classes are frequently referred to as “global”?

Yes…

–Eric

Thank you ! :smile: