Public Variables - Penelope Tutorial -

Hello all,

i just started with Unity iPhone and was checking the Penelope tutorial pdf. On the scripts appendix, joystick.js, there are some variables declared as public (e.g. public var tapCount : int;).

Is the only purpose of using a public variable to expose it to the editor?

Sorry for these noob questions, but searching through the documentation + forum search did not clarify this doubt.

Thanks in advance!

public variables are required to access the value from outside the class.
Be it from the editor or from another script you have written.

Thanks for the help, dreamora.

I’m just starting with scripting and was getting confused if public and static variables were the same (the scripting reference only refers member, private and global variables).