- Home /
How to determine input device being used?
There are some input solutions where it would be really nice to know if a given input method is in use. Obviously if you know that you're on, say an iPad, you know the primary input is touch. If you are on a PC your primary input it likely to be mouse but with touch PCs coming out I need to know what input devices are really in use rather than making assumptions.
This is becoming even more acute on a web player. There are some situations where with a mouse I want to use absolute positioning but with touch I want to use relative positioning. I don't know if the user is interacting with touch or mouse (but I hope that there is a way to find out already in Unity).
Going beyond #if _UNITY_IPHONE etc. how can I find out what the input device actually is, (because going by what platform I'm on is an increasingly poor way to assume control method)?
Thanks.
Your answer
Follow this Question
Related Questions
Convert Mouse Input to Touch Input 0 Answers
OnMouseDown is checked when build for Android 2 Answers
How do android touch / mouse inputs get buffered? 0 Answers
Switch Between Touch And Mouse Controls 0 Answers
How to Determine Player Input Method 1 Answer