- Home /
Is it possible to test Touch event without IOS?
As I've searched, the previous Unity has IphoneTouch event will convert to OnMouseUp automatically when there are not real touch.
But IphoneTouch is obsolete so, I wonder for Normal Unity 3.4 to do the same.
I am newbie to Unity. If there are good sample for mouse event and touch event, please let me know. Thank you.
Answer by Dreamora · Aug 08, 2011 at 03:43 AM
iphonetouch was deprecated in Unity 3.0 already, because since Unity 3 there is more than iphone with touch, so its now in Input.touches :)
It will work for iOS (+Remote), Android (+Remote) and on windows 7
If you want to support both to their real level, then yes.
Touch 1 (the first) will also trigger the mouse button 0 functions, but neither can you get mouse button 1 or 2 with touches nor will the mouse functions be called for touch 2 - 11, so yes optimally you would implement both.
And to save performance and nerves, look at the manual - conditional compilation so you see how you can ensure that the mouse code is not present at all on mobiles while the touch is not present on desktop for example, so you can focus the input schemes on the corresponding platforms
Your answer
Follow this Question
Related Questions
Convert Touch input to Mouse input C#? 1 Answer
Rotate on drag for IOS? 1 Answer
Convert Mouse Input to Touch Input 0 Answers
Touch / mouse code. 1 Answer