GameObject cube = Instantiate(Resources.Load(“cube1”, typeof(GameObject))) as GameObject;
When I use this, theres the error “ArgumentException: The Object you want to instantiate is null.”
I dont know what could be since I have everything set up.
GameObject cube = Instantiate(Resources.Load(“cube1”, typeof(GameObject))) as GameObject;
When I use this, theres the error “ArgumentException: The Object you want to instantiate is null.”
I dont know what could be since I have everything set up.
That error would mean that Resources.Load returned null, which means it couldn’t find your prefab file. Can you post a screenshot of your project folder, with the Resources folder expanded?
Your Resources folder must be inside your Assets folder.