Advertisement
kasru

Custom Cursor

Jan 21st, 2013
5,916
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //****** Donations are greatly appreciated.  ******
  2. //****** You can donate directly to Jesse through paypal at  https://www.paypal.me/JEtzler   ******
  3.  
  4. var yourCursor : Texture2D;  // Your cursor texture
  5. var cursorSizeX : int = 16;  // Your cursor size x
  6. var cursorSizeY : int = 16;  // Your cursor size y
  7.  
  8. function Start()
  9. {
  10.     Screen.showCursor = false;
  11. }
  12.  
  13. function OnGUI()
  14. {
  15.     GUI.DrawTexture (Rect(Event.current.mousePosition.x-cursorSizeX/2, Event.current.mousePosition.y-cursorSizeY/2, cursorSizeX, cursorSizeY), yourCursor);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement