Question by
DinoMijatovic · Sep 20, 2015 at 05:44 PM ·
gameobjectspawningnew
Instantiate creating 2 objects instead of one
Hey guys, here's a sample of my code in C#
currentPucks = 0;
puckSets[currentSet] = new GameObject[maxPucks];
puckSets[currentSet][currentPucks] = (GameObject)Instantiate(PuckPrefab, new Vector3(0.0f, 5.0f, 75.0f), Quaternion.identity);
for some reason, even though I only call instantiate once, two objects, or clones rather, get created instead of one. I'm not really sure what's happening here, so if you guys have any idea that would be great! I didn't put up that much code because I didn't want to clutter the post, but if there's anything else you guys would like to know please do let me know!
Cheers
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612034348im_/https://answers.unity.com/themes/thub/images/avi.jpg)