Answers for "unity detect touch"

C#
1

unity detect a touch on ui element

foreach (Touch touch in Input.touches)
{
    int id = touch.fingerId;
    if (EventSystem.current.IsPointerOverGameObject(id))
    {
        // ui touched
    }
 }
Posted by: Guest on April-11-2021

C# Answers by Framework

Browse Popular Code Answers by Language