- Home /
Question by
ddule · Apr 29, 2018 at 03:15 PM ·
mobilemousebox collidertap
How to make mouse click and tap work in same cases on boxCollider2d
I am making game for mobile and I want to do testing on the PC(clicking with mouse) but I also want to work on it the phone(tapping on button),so is there functions that will work synchronized,both with mouse and touch? And the object that need to be clicked/tapped have BoxCollider2D.
Comment
Answer by SharkoFR · Apr 29, 2018 at 08:18 PM
Just add the component "Event Trigger" and in, add the event "Pointer Click"
capture.png
(53.1 kB)
Your answer
Follow this Question
Related Questions
Unity2D move object by touch input 0 Answers
Mobile platformer jump not working 2D 1 Answer
Raycast and box collider not working properly 2 Answers
Where and when to avoid using mesh Colliders for performance issues. 1 Answer
RaycastHit only way to do OnMouse events for colliders in Mobile? 0 Answers