- Home /
Can This be done Easier? Duplicating gameobjects
As you can see in the picture up here, i got alot of gameobjects named cube.
-Why did i made the map out of single cubes? and not just out of one cube where i could transformed the scale X,Z??? Thats because i want to make an interactive map. Every cube get the same rigedbody, as Example : When the player runs over a cube, the cube will start to fall down with a delay of 0.5 sec.
MY QUESTION IS : how can this be done easier and faster. I don't want to duplicate every block. It will make the hierarchy just very messy. And i'm planning to make a map that is even 20x bigger than the map you saw in the picture.
Help me Please, I just started with Unity and already know a little. I even checked some tutorials but nothing mention how to do this easier.
Answer by gjf · Jul 18, 2013 at 09:10 AM
depending on your experience, you could write a script to generate the cubes in any X*Y configuration using prefabs with all the settings you need. additionally, you can programmatically alter the cubes too - either individually or en masse.
thanks, I googled it and found something that is similar with what i try to do :).