Question by
djpiper28 · Mar 07, 2016 at 07:14 PM ·
touch controls
Function OnTouchDown?
I need a function like function OnMouseDown(){/*What I want todo*/ }
but for mobile
Comment
Best Answer
Answer by Zoogyburger · Mar 07, 2016 at 11:14 PM
http://docs.unity3d.com/Manual/MobileInput.html
https://unity3d.com/learn/tutorials/projects/2d-roguelike/mobile
https://unity3d.com/learn/tutorials/modules/beginner/platform-specific/multitouch-input
https://www.youtube.com/watch?v=SrCUO46jcxk
Answer by JustHallowed · Jan 17 at 10:57 AM
if(Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began) { // Do something }