Null Reference Exception

I am getting a null reference exception after clicking play showing that Object
Reference not set to an instance of an object.
Lecture no.98 using a foreach loop .

Hi Shlok,

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.


See also:

Hey thanks for the response and I found out the solution I selected the wave2 in my prefab and forgot to apply it . The solution was so simple idiot me.
And thanks for your help Nina.

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

Privacy & Terms