Advertisement
Guest User

Untitled

a guest
May 30th, 2015
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var yourCursor : Texture2D;  // Your cursor texture
  2. var cursorSizeX : int = 16;  // Your cursor size x
  3. var cursorSizeY : int = 16;  // Your cursor size y
  4.  
  5. function Start()
  6. {
  7.     Screen.showCursor = false;
  8. }
  9.  
  10. function OnGUI()
  11. {
  12.     GUI.DrawTexture (Rect(Event.current.mousePosition.x-cursorSizeX/2, Event.current.mousePosition.y-cursorSizeY/2, cursorSizeX, cursorSizeY), yourCursor);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement