How do I instantiate an object that does not exist in my scene?
I seem to be having an issue trying to instantiate an object that does not already exist in the game somewhere.
var newObject = Instantiate(pickUpRigidbody, spawner.position, spawner.rotation);
That is my instantiating code however I get this error:
MissingReferenceException: The object of type 'Rigidbody' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.
I am indeed destroying the object but I might be missing a reference somewhere.
Your answer
Follow this Question
Related Questions
Why my object dont want to Update ? 0 Answers
Prefab not Instantiating 0 Answers
I got Some Error about how to Transform Postiton Enemy where one point can spawn 2 enemies. 1 Answer
Update only when mouse clicked on certain objects and wait for next click 0 Answers
For loop and Instantiate issue 2 Answers