Follow

ArgumentException: The thing you want to instantiate is null.

Symptoms

  • I am getting the error below appearing in my console:
error ArgumentException: The thing that you want to instantiate is null. 
Unity Engine.Object.CheckNullArgument (System.Object arg,
System.String.Message)

Cause

This error is caused when you use a script to instantiate a GameObject that does not reference a prefab.

Resolution

You will need to assign a reference to the GameObject that you wish to instantiate via the inspector or a script.

Via the inspector:

Create reference via a script:

More Information

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.