What is "Input.mousePresent"?

I could not find anything about Input.mousePresent at all in the Documentations.

This is the closest thing I found so far.

Yet it is referenced in UnityEngine itself:

Someone suggested that it’s for Android, so maybe it is that.

While reporting this, could someone tell me what it is correctly? Thanks.

Hadn’t seen this before, I will ask around!

Please update once you know what it is! Thanks!

Maybe it returns true if the mouse is plugged in and false if it's not plugged in?

Then what do you make of it for Android and iOS?

@duck Any updates so far?

I wouldn’t think that every variable is meant to be used on every system. Would the tilt input be usable on PC? Also, there are many other variables that are undocumented.

Ok, I've just managed to get some info about this.

Apparently it was added back in Jan 2013, and it looks like it should be documented and publicly usable, so it's a mistake that it's marked as 'undoc' in our system.

Under the hood, the actual implementation seems to be:

  • On Windows, Android, Metro, does actual mouse presence detection, so may be true or false.

  • On Linux, Mac, WebGL, always returns true.

  • On iOS and console platforms, always returns false

Now that I've got this info, I'll make the page visible in the docs and update it :)

1 Like

This is now included in the latest docs:

1 Like

I am curious: Can this fucntion distinguish between a touchpad (as laptop’s have) and a USB mouse? I tried it on Windows and it doesn’t seem to. Both when I only use the touchpad as well as when the mouse is plugged in the function returns true.