What is recent & up to date? Recognize Mouse click or if You want to drag - Touch or MouseDown?

I have looked al over the internet, spend weeks already on this one issue.I read many storys that the code for this particular question will not work on mobile or Ios or is outdated.
I am preparing an bird perspective world where the player has to be able to “drag” over the level (no character at all) for movement “without” accidentally triggering objects during dragging! This is the issue, when start dragging by clicking on an gameobject means also triggering that object!

I succeeded in an OnMouse Down script in Which I have an working timer, so only after an certain amount of time an object gets triggered. But I did read that “OnMouseDown” is old code and not working on Ios or mobile. So I wasted all this time?

Why is this basic function so difficult to find clear answers?

The goal is an universal code that works on all platforms that will differentiate when touching the screen means dragging or else interact with an game object.
So: when You click the game object the object has to recognize You want to activate it’s connected trigger or start dragging only.

Thanks for some support, some links I investigated so far and played with:

You can use this Unity - Scripting API: Input
Its the current system that is being replaced as well.
Using Input.GetMouseButtonXXX(0); will give you the first touch on touch devices.

The new input system even though it is in preview, is a better system that allows for much better cross platform input. It makes it universal, which is what you want.
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/index.html

BTW all your links lead to the same page.

Hi Chris! Thanks, indeed the links all go to thesame page, was preparing the message on mobile Phone something must have gone wrong.

I keep studying the code, keep learning and will study Your links. I dont mind buying some assets too, it seems Touch+ could probvide the function I am looking for and seems updated very well :slight_smile:

Thanks for Your support