- Home /
Solved
How to make Instantiate() only create one duplication of original GameObject?
Hi,
When I use Instantiate to duplicate my GameObject, I want it to just create one new GameObject with the same settings as my original GameObject. What it's doing right now is duplicating the current amount of original gameobjects on screen and adding one. So it starts off by duplicating the only object on screen (I named it Marble), but the second time I run it it creates 3 more, and then 7, 15, and so on until Unity crashes because there's so many being created at once.
All I am doing right now is running Instantiate(marble, pos., quat.) where marble is the original GameObject marble.
All I need it to do is create one duplication of the original GameObject, any ideas?
Thanks
EDIT: wasnt using prefabs to create new ones was using the gameobject
Follow this Question
Related Questions
How to make projectiles shoot diagonally? 1 Answer
Stacked Bullets on Instantiation 0 Answers
2D repeating obstacles with a random Y value 0 Answers
how to instantiate UI image in unity2D 1 Answer
How to destroy a object when it's off screen and re-instantiate it when it gets back on screen 0 Answers