Error in the scrip

Hi The console send me this error but I cant find it in the script, all looks the same as the video.


and here is the part where the error reference to…

So i get lost… Can anyone help me???

Hi Jose,

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.

If you didn’t assign a reference in the Inspector, the reference must be assigned via code. Maybe your code was not able to find the object or assign it to the correct variable.

Did this help?


See also:

Thanks. I found the error. Was in start I didn’t write a method to get the component.

Thanks

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

Privacy & Terms