I use Unity 2022.1 version
I learned how to use the new Input system in my project,
I have in my actions asset file, one action as (Touchscreen > PrimaryTouch / Tap)
Unity detect my single input, but it trigger the event 3 times
void TouchDetected()
{
Debug.Log("Touch Detected"); // it prints 3 times
}
-
tried to use Input.touchesCount to limit the event for 1 tap, but won’t work as I found touches is not supported in my MacOS (have to use mobile device)
-
Tried to use Unity Remote 5 on my mobile, but did not work
-
Tried to use Input.GetMouseInputDown(0), Unity made error, as I’m using the new Input system cannot use that function
this is the first issue,
my second issue is I would like to detect the touch position
(as my goal is to disable the touch in a part of the screen / it override on another game object for another input purpose)