Quote:
How do I fix "object reference not set to an instance of an object" error in unity?
Giving complete error message is a good idea because if you dare to read it carefully, it tells you where is the error, and that help to locate the problem.
Quote:
"object reference not set to an instance of an object"
No matter what is the exact problem, somewhere in your code, you try to use a variable that is supposed to be an object.
Either you forgot to initialize the object, either some code failed to return an expected object.
Sometimes, the fail is do to exhausted limited resource, in this case, you need to check if request succeed or not.