Custom Mouse Pointer
From Unify Community Wiki
Author: Kiyaku
Description
If you want a custom image for your mouse pointer but still have it in front of the OnGUI() elements, use this little script.
Usage
Attach this script to any gameObject you want, preferable a new empty one. Assign your custom Texture to the script.
C# - mousePointer.cs
<csharp> using UnityEngine; using System.Collections;
public class mousePointer : MonoBehaviour {
public Texture2D cursorImage;
private int cursorWidth = 32; private int cursorHeight = 32;
void Start() { Screen.showCursor = false; }
void OnGUI() { GUI.DrawTexture(new Rect(Input.mousePosition.x, Screen.height - Input.mousePosition.y, cursorWidth, cursorHeight), cursorImage); }
} </csharp>