NullReferenceException: Object reference not set to an instance of an object

Udemy Unity Game Developer 2D lecture 98~102.

I have this error. plz help!!

NullReferenceException: Object reference not set to an instance of an object
EnemyPath.Move () (at Assets/Scripts/EnemyPath.cs:33)
EnemyPath.Update () (at Assets/Scripts/EnemyPath.cs:22)

Hi,

Welcome to our community! :slight_smile:

NullReferenceException means that a reference (“link”) to an instance is missing. Double click on the error message to see to which line in your code it is referring. If you exposed a field in the Inspector, make sure that it’s not empty.

Did this help?


See also:

Wow!! Thank you for quick response!!!

But as you see screenshot I filled of field in the Inspector.
First screenshot is that was double click on error message.
I don’t know where it is missing.
And only one of the four type of waves which I made works fine.
Should I make it from scratch?

I solved the error.

Thank you for your response!!

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

Privacy & Terms