E
E
Emil2019-02-10 22:44:26
Mobile development
Emil, 2019-02-10 22:44:26

Will OnMousDown work on smartphones?

Good day everyone, I am developing a game for mobile platforms, this is my first project, and there is not much experience yet. I implement clicks on the interface through OnMousDown. Will tachi work on phones? And if not, what do I need to change? Thanks in advance to all who respond.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MishkaVNorky, 2019-02-11
@DyadyaEmil

OnMousDown will be created not for clicking on interface buttons, but in 3D.
To catch clicking on objects in interfaces, the IPointerDownHandler, Up, Click, Drag, etc. interfaces are needed. (don't forget to include in using) https://docs.unity3d.com/ScriptReference/EventSyst...
The object must have an Image component (it doesn't matter if there is an image itself) and have a checkbox for catching clicks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question