SetCursor not working?

hi im interested in this code in the docs,
it changes the cursor in the game.

i copy pasted it in a new javascript, added it to standard assets folder and im getting
Assets/Standard Assets/mousetexture.js(2,18): BCE0018: The name ‘CursorMode’ does not denote a valid type (‘not found’).

any heads up? im a newbie so i might need some explaining :smiley:

var cursorTexture : Texture2D;
var cursorMode : CursorMode = CursorMode.Auto;
var hotSpot : Vector2 = Vector2.zero;

function OnMouseEnter () {
    Cursor.SetCursor(cursorTexture, hotSpot, cursorMode);
}

function OnMouseExit () {
    Cursor.SetCursor(null, Vector2.zero, cursorMode);
}

The scripting reference doesn’t differentiate between version-specific features (it should -_-). Are you using Unity 4.0? I don’t think that functionality exists in 3.x.

If that doesn’t help, try moving the script to a different folder (“Standard Assets” has some extra… ‘rules baggage’)