1 answer · asked · Lesson: Scripting Enemy Detection · Course: Fundamentals of Pathfinding

Game will not play

When adding the detection script it tells me that I will lose the prefab connection to the enemy, and gives me a NullReferenceException error saying: Object reference not set to an instance of an object

  • crew

    That error means something is not being assigned properly. The rest of the error should tell you what you need to do. It's usually something along the lines of "you probably need to assign XX of XX script". If you post a screenshot of the entire error code I can help you out better.