Pick a word (almost) any word
We're going to put the Language Reference through some serious stress testing here. We're going to arm ourselves with every synonym for "mouse" we can think of. Here's a list that I painstakingly brainstormed: mouse, screen position, cursor, pointer, input device, small rodent, two-button, aim, point. One of those has to do the trick. And, if we come up empty-handed, we're going to hit those online tutorials hard until we find our answer.
Go ahead, fire up the Unity Language Reference and type mouse into the Search field. Scour the resulting list. We will not back down. We will not take "no" for an… oh, hello, what's this?
Midway down the list, there's this entry:
Input.mousePosition
The current mouse position in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access