- Home /
Duplicate Question
How to start the game with CurrentInputMode being "Buttons" instead of "Mouse" in StandaloneInputModule?
Hi, is there a way to start the game with the CurrentInputMode being selected as "Buttons"? (I can't set it directly because that variable is read only).
To give a bit of context to those don't understand what I'm talking about, basically, when the game starts, by default the StandaloneInputModule has its variable CurrentInputMode (which you can see it in Debug mode) set to "Mouse". This means that it is expecting mouse input, and if you try to give a gamepad input (e.g. moving your analogue stick down), the gamepad input will not take action, but instead switches the CurrentInputMode from "Mouse" to "Buttons". After this point, your gamepad inputs will be recognised correctly.
I did a quick search and it seems to be a "feature" that Unity is currently having. http://forum.unity3d.com/threads/onpointerenter-highlight-state-not-working-until-mouse-click.280304/
I'm wondering, do you guys know anyway to start the game having the CurrentInputMode set to "Buttons" instead of "Mouse"?
Much appreciated.