I have some code that causes a gameObject to out so far and duplicate itself multiple times before it destroys itself. I need to limit the amount of times that this happens. It might happen once or it might happen 3 times. The duplicated objects will duplicate as well and then it will go on forever.
I am just trying to figure out the best way to limit this. GetComponent seems like it would not work well. Tags seem to be the easiest way to implement this. When a gameObject with "Dupe3" spawns it will spawn gameObjects with tag "Dupe2" etc. Until its finally done.
↧