0
\$\begingroup\$

I need to know this for a little popup I made in my game, I want to avoid using OnMouseDown because I have multiple cameras so I was wondering how I'd be able to detect a mouse click event on an object using Raycasting, as I can't figure it out :/

Thank you!

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Add a physics raycaster to your camera and an EventSystem to your scene, then implement the IPointerX (up, down etc) handler in your script.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .