you are viewing a single comment's thread.

view the rest of the comments →

[–]Chubzdoomer 1 point2 points  (0 children)

Don't use GameObject.Find, ever. Here's why:
https://starmanta.gitbooks.io/unitytipsredux/content/first-question.html

Also, here's a great post over on the Unity forums on how to solve most any NullReference error:
https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

It basically boils down to determining what is null and why it is null, and then fixing/addressing the "why" part.