Hello, I am new to Unity, but i was following a tutorial about making a simple Android game and something is not working right for me.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BallControl : MonoBehaviour
{
public float power = 10f;
public float maxDrag = 5f;
public Rigidbody2D rb;
void Update()
{
if(Input.touchCount > 0)
{
Debug.Log("works");
}
}
}
I have this really simple code but it never seems to reach inside of the if statement. I’ve tried putting Debug.Log outside the if, and it worked.
The script is attached properly.
There is no error, no warning or anything it simply doesn’t work, I will appreciate any help.