- Home /
Array of scenes for android game
Hi all,
Just a quick question to see if this is possible. I am making an android game in unity. The game itself has no real structure and doesn't need to be played in a linear way. I want to use different scenes for different mini-games. I want to know if I can create an array of the scenes I make to load randomly so its not the same every time. Basically I will have the main menu and when the new game button is pushed it will load a random scene from an array filled with the different scenes I have created. Is this possible or should I think of a new way to do it?
Since all the scenes also have a numeric value assigned to them that you can use to call that scene you can use it here.
If all your scenes that are to be called are in a straight sequence then all you need to do is choose a random number between these two numbers and open the scene with that number.
If your scenes to be called are not in a sequence then you can store their numbers in an array and you can access a random index of array and open the scene associated with element which is a number stored at that array index.
Ill give it a try thanks for the information I was not sure this was possible
Your answer
Follow this Question
Related Questions
TextAsset inside the Array - UnityScript/JavaScript 1 Answer
Sorting arrays? 1 Answer
How to delete new'd arrays? 2 Answers
what is the difference between a float[] and a float[,]? 1 Answer
Parse Array data to generate html 0 Answers