cursors

Is there a way to change the mouse cursor from simple pointer to e.g. finger when you hover a GUI button or the “I” shape cursor when you hover a GUI textfield in game? Unity doesn’t seem to do that automatically, cursor is a pointer all the time…

Thanks

The answer rather lie in : how to make a custom cursor. There are already multiple topics about that. That main idea is, instead of using the actual cursor, make a GUITexture, or GUI.DrawTexture, to draw a picture of a cursor, and move it accordingly to mouse X and Y delta. So, you are able to change that texture for anything you want (a reticle, a cursor…).

Aw, I was hoping for some simple built-in function :smile:
Oh well though, better than nothing! I’ll try that when I get back home, found it in the wiki:
http://www.unifycommunity.com/wiki/index.php?title=Custom_Mouse_Pointer

Thanks :slight_smile:

var cursorImage : Texture2D;

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

function OnGUI()
{
	
	GUI.DrawTexture(new Rect(Input.mousePosition.x, Screen.height - Input.mousePosition.y, 32, 32), cursorImage);
}
	
}

Yes, I know. Thank you :stuck_out_tongue: