I am trying to change the cursor on a unity game but no matter what I do I consistently get this error:
Failed to set the cursor because the specified texture (‘Cursor’) was not CPU accessible.
UnityEngine.Cursor:SetCursor (UnityEngine.Texture2D,UnityEngine.Vector2,UnityEngine.CursorMode)
Player:Awake () (at Assets/Scripts/Player.cs:19)
Here is my code:
public Texture2D cursorTexture;
void Awake()
{
Cursor.SetCursor(cursorTexture, Vector2.zero, CursorMode.Auto);
}
The cursor texture is a 64*64 PNG image.
Any help would be appreciated.
This is still one of the main posts that comes up when this question is asked. I don’t understand the thought of needing a workaround or other things to check when most people’s problem is resolved by the answer(s) given by those who posted the texture properties needed.
Thanks goes out to those who guided newbies to Unity to the correct import settings.