How to refer to the class itself?

I am still very new to Unity and am trying to learn. I found out about iTween and thought it is similar to the Flash version of it. In a Javascript file called MyCube.js attached to a cube in the scene, I had a this line in the OnSelected function:

iTween.MoveTo(this, {"z": -1, "time": 0.5});

From the iTween documentation, the first argument takes in a GameObject. Since all objects in the scene inherits from the GameObject and I want it to refer to itself, I thought I write “this” to represent the MyCube.

However, I get an error saying that:

BCE0023: No appropriate version of 'iTween.MoveTo' for the argument list '(MyCube, Boo.Lang.Hash)' was found.

How can I refer to a class itself in Unity?

‘this’ refers to the script and not the gameObject. You can simply say


to refer to the gameObject that this script is attached to. It is the same as saying