I’m currently participating in a Unity tutorial, and I ran into something weird. The term “&&,” which he uses, is an “invalid expression” in my game. I don’t understand, could it be a simple mistake I made earlier in the script? This is a piece of it:
void Update()
{
if (Input.GetButtonDown(“Fire1”)) &&
Time.time > nextFire) {
nextFire = Time.time + fireRate;StartCoroutine(ShotEffect()); Vector3 rayOrigin = fpsCam.ViewportToWorldPoint(new
Vector3(0.5f, 0.5f, 0));
}
Also, this is the tutorial: Let’s Try: Shooting with Raycasts (Video)