NavMeshAI Script

I created the EnemyAI script, my script is identical to the one in the tutorial, but for some reason Unity won’t let me drag my player into the Enemy AI script. I have also just noticed in the inspector where the Enemy AI script is, there is no target box to drag my player into. Any ideas on why this is and how to fix, thank you… Here’s a bug report screenshot to help identify the issue.

So I removed all EnemyAI scripts and components, restarted Unity and started again from scratch due to duplicate script namespace, but now I have another issue instead, here’s the latest bug report…

Hi,

There is probably a typo in the EnemyAI script or a misplaced character. Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture?

1 Like

Thanks for reply, I feel like a right idiot now lol, so I checked the script 10 times over and couldn’t see any typos, but now after looking at it again I have just noticed I typed : instead of ; at the end of the script. Problem solved, thank you…

You’re welcome. And don’t worry too much about that typo. Everybody makes them from time to time. These little culprits are often hard to see. :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.