Hey! I’m a beginner and I started creating a 2D game in unity based on tutorials. After trying to pass variables, obstacle spawning stopped working. And it’s not working, even after deleting code that I tried to use. It throws this error:
ArgumentException: The Object you want to instantiate is null.
UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:374)
UnityEngine.Object.Instantiate (UnityEngine.Object original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:197)
UnityEngine.Object.Instantiate[T] (T original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:276)
Spawner.Update () (at Assets/Spawner.cs:17)
Here’s a link to GitHub repository of this project:
https://github.com/ZuriPL/GameTroubleshooting
Please help me.