Unity3D custom cursor looks distorted

facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

This brief article will hopefully show you how to get a custom cursor working in Unity3D, with little pain.

Make sure you’ve created your cursors, and saved as transparent PNG. Most importantly, when you make your cursor(s), set the image width and height to something like 32px by 32px, or other multiples of 16. Having uneven or unusual width/height values will result in distorted and crappy looking cursors.

Import your cursor texture file into Unity3D, and select it in Assets / Project panel. In the Inspector, the following texture settings should suffice:

Set Texture Type to Cursor
Set Wrap Mode to Clamp

Image below as an example:

cursorSettings
To add the cursor to your project, go into Edit > Project Settings > Player. You’ll see a space for Default Cursor where you can set the texture. Now you are ready to test it.

3 Comments

  1. Pingback: Custom Unity3D cursor appears distorted | VISUALS+CODE

  2. Omg! Thank you so much ^_^

  3. Thanks, it fixed my stretched cursor issue that appeared on Windows (but not Linux). Also note that even if you make a bigger cursor like 64×64, it will eventually be scaled down to 32×32 on Windows. If your cursor doesn’t fill the whole image square, it will appear smaller than 32×32 on screen. So try to make all your cursors fill the image square, unless you want them to specifically appear smaller.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">