How to make the mouse cursor fit to the rest of the game sprites in pixel perfect game?
I set my game to be 320 on 200 pixels and all the sprites are 1 pixel per unit.
When I add a sprite for the cursor (tried to make its settings Cursor or Sprite) its not fit the other sprites and it’s smaller than what it intended.
How about making a gameObject and treating it as an coursor. You will be able to move it by script pixel by pixel. You will detect mouse movement with invisible mouse pointer, and move the sprite mouse pointer you created.
Set the cursor like this…
Vector2 hotspot = Vector2.zero;
Cursor.SetCursor(_Cursor, hotspot, CursorMode.Auto);
Texture type is set to Cursor not Sprite.
For 100% pixel accuracy, you want the tip of your cursor texture on the top left pixel.
hotspot determines the pixel that is the tip of your Cursor