So I ran into some trouble a few videos ago because I’m using a more recent version of Unity. I was unable to drag the children of Path (0) to my Enemy Prefab. Looking at the Lecture Discussions for that video I found a discussion that addressed the exact issue. The gist of that discussion was don’t worry, this all gets resolved in a few videos when the Foreach Loop is implemented.
Well I’ve followed along and I believe that I have everything set up correctly but now I’m getting a NullReferenceException error.
Here’s a screenshot of that error.
So these errors tell me that “Object reference not set to an instance of an object… then the Method… in the EnemyPathing.cs script.”
I think I’ve got EnemyPathing set up exactly as Rick does. The only difference is I’ve changed the name of waypointIndex to waypointsIndex.
Here’s a screenshot of that.
I’m not sure where to go next. Any assistance would be greatly appreciated.