Default References Problem

Hello guys. When i adding to my jscript class. In inspector on Default References of a Script i can’t see variables. Like Texture or Camera etc. Whithout class - all works fine. Thank you!

class HelloWorld extends MonoBehaviour
{
public var Texture : Texture2D; // I dont see it on References. What's prob?

function Update()
{

}
}

Have a look at this:

Unity javascript is different from the javascript you know. You do not need the class keyword and once you have removed that it will show in the references:

public var texture : Texture2D; // now you see it

function Update()

{

}

That is all the code that you need to use. The Script is a class of the type that you use to name your script so you can search for it that way using GetComponent etc.