Making the cursor disappear after the mouse being inactive for a set amount of time?
Hello,
I am currently making my first game and have just created a custom sprite for my cursor. Although now I would like, when the game is being played, for the cursor to disappear after the player doesn't move the mouse for a set amount of time (doesn't have to be real-time). I am led to believe that the easiest way to make the cursor disappear would be to use:
Cursor.visible = false;
However I do not know how to know when the mouse is being moved or how long ago it was since its last move so cannot fully make the script. Obviously I would also like to script that, when the player moves the mouse once more, the cursor reappears in order for them to click the UI elements. I would appreciate if someone could help me out with this thank you.
(P.s. I have looked through the question and documentation sections of unity and cannot find anything so if it is there then I am sorry for wasting your time)
Thank you very much I think i can work it out from there!