I have a game where there are multiple rounds. Each round has a different map and at the end of the round a random scene is loaded from a list of scenes. I have a list of scenes like:
Arena 1
Arena 2
Arena 3
Arena 4
Arena 5
And I randomly load them when the round is over using this line of code:
Application.LoadLevel("Arena " + Random.Range(1, LEVEL_COUNT));
where LEVEL_COUNT
is the max number of scenes I have.
This works fine, except sometimes when the round is over, the same scene that has just been played reloads. Say if you play Arena 3
and the round is over, Arena 3
may reload again.
So, is it possible to load a random scene like I am doing, but not load a scene that is the same scene we have just played? So load anything BUT Arena 3
in this case.
Thanks for the help!