hi I am at unity right now and I want to send out as many cubes as in a round, for example the first round a cube is sent and the fifth round five cubes have an idea how to do it but have a hard time starting
Anyone here who has time left and wants to help?
this is my first game in unity and im kinda lost XD
Sorry okay I may need to add a little more clarity with my question.
I’m trying to make a game where you are a cube in the middle of a plane and every round there are cubes from different directions
What I am trying to do right now is to spawn cubes from different directions and that there will be as many cubes as the round that is shown, for example, if the round 5, there will be 5 cubes from different directions that you have to dodge
I believe that you want a difficulty-ramp-up type of game where more cubes spawn each round to make it harder to complete.
Quite simply, if you’re keeping track of what round you’re on, you can use that value as the number of cubes to be instantiated in the next round.
I don’t know how you’re spawning your cubes, but I would write something like this:
public class CubeSpawner : MonoBehaviour
public int CubesToSpawn = 1;
public GameObject Cube;
private List<GameObject> cubes = new List<GameObject>();
if (cubes.Count == 0)
for (int i = 0; i < CubesToSpawn; i++)
// Instantiate 'Cube' 'i' amount of times
// cubes.Add('cube') adds to a list of how many cubes are left in the scene
// when destroyed, the cube is removed from the list.
CubesToSpawn++; // Spawns more cubes next round