So I have been coding a game that involves zombies, currently I am working on the animation and pathfinding. Whis is my nav mesh code that gets the error:
***// Update is called once per frame
void Update () {
nav.SetDestination (player.position);
controller.SetFloat ("speed", Mathf.Abs (nav.velocity.x) + Mathf.Abs (nav.velocity.z));
}***
And this is the error I get:
"A namespace cannot directly contain members such as fields or methods."
PLEASE HELP! D:
↧