I'm new to unity and am following a course. I ran across this error:
Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
Here is my code:
using UnityEngine;
public class PlayerCollision : MonoBehaviour
{
public PlayerMovement movement;
void OnCollisionEnter (Collision collisionInfo)
{
if (collisionInfo.collider.tag == "Obstacle")
{
Debug.Log("We hit an obstacle!");
movement.enabled = false;
FindObjectOfType<GameManager>().EndGame;
}
}
}
Can someone clarify to me what this means?