Input.anyKey

Should Input.anyKey return true for mouse clicks? – Because it does.

I’m looking to test for anyKey – NOT anyInput

I can test for NOT a MOUSE BUTTON after I get the anyKey event but…
I wanted to know if this should be considered a bug?

Cheers,

In this case Event.isKey is probably what you need.

Event script ref:

My gut instinct says that’s a bug Tom. Even if it turns out that anyKey is supposed to look for keys or mouse buttons, then that needs better explanation the docs as I just don’t quite ever see mouse buttons as “keys”.

Log it!

I don’t know but

if (Input.anyKey && !Input.GetMouseButton(0)) {
    // code
}

will work

And it’s not a bug by the way, I saw in the documentation it’s supposed to register mouse clicks too.