system
January 31, 2015, 4:48pm
1
How can I select on of scenes? (scene names: cl_1, cl_2? cl_3, cl_4, cl_5)
I tried all of this…
http://forum.unity3d.com/threads/load-a-scene-randomly-out-of-a-list-of-scenes.55199/
Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.
Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.
Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.
Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.
1 Answer
1
Application.LoadLevel(“cl_”+Random.Range(1,5));
Is this helpful?
It is important to remember that Lists and arrays start from 0. So if you have your scenes stored in a List or Array, by using Random.Range(1,5) you'll be ignoring the first level. The correct way would be (0,5).
– superluigi