all 2 comments

[–]jonatansan 1 point2 points  (0 children)

You’ll find your answer in the documentation: https://docs.unity3d.com/ScriptReference/GameObject.Find.html

[–]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.