Quantcast
Channel: Questions in topic: "renaming"
Viewing all articles
Browse latest Browse all 48

Renaming a GameObject Clone

$
0
0
spawnObject is just the object to be cloned dragged into a public variable. spawner is a empty gameobejct for where they spawn. Heres the code, inside a incrementing while loop: GameObject clone = Instantiate (spawnObject.transform, spawner.transform.position, spawner.transform.rotation) as GameObject; clone.name = "spagetti" + Protifuge_Count; I keep getting this error during run time: NullReferenceException: Object reference not set to an instance of an object Debug_Camera+c__Iterator0.MoveNext () (at Assets/IOM/Scripts/Debug_Camera.cs:40) I've tried several different things and don't know what the problem is...

Viewing all articles
Browse latest Browse all 48

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>