프로그래밍/Unity3d

[Unity3d]Customise in-game cursor

프리월드 2012. 8. 3. 11:33


http://answers.unity3d.com/questions/8910/customise-in-game-cursor.html

var cursorImage : Texture;

function Start() {
    Screen.showCursor = false;
}

function OnGUI() {
    var mousePos : Vector3 = Input.mousePosition;
    var pos : Rect = Rect(mousePos.x,Screen.height - mousePos.y,cursorImage.width,cursorImage.height);
    GUI.Label(pos,cursorImage);
}

MouseCursor.cs