@AsylkhanY

Почему выходит ошибка?

Touch touch = Input.GetTouch(0);
        if (touch.deltaPosition.x > 0f)
        {
            Debug.Log("right");
        }
        if (touch.deltaPosition.x < 0f)
        {
            Debug.Log("left");
        }


Выходит эта ошибка :
ArgumentException: Index out of bounds.
UnityEngine.Input.GetTouch (System.Int32 index) (at <2db13ba0d52343228aa9892c408fb49a>:0)
MoveManager.Update () (at Assets/Scripts/MoveManager.cs:16)
  • Вопрос задан
  • 86 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы