Alright guys, so here's my question, how could I make a GUI Button that would load the respective level in an array for every element in that array? Here is my code at the moment:
var skin : GUISkin;
var levelGUINames : String[];
var levelSceneNames : String[];
var i : int;
function OnGUI () {
GUI.skin = skin;
GUILayout.BeginArea(Rect(Screen.width / 2 - 350, Screen.height / 2 - 200, 700, 700));
GUILayout.Box("Level Select");
for(var str : String in levelGUINames) {
if (GUILayout.Button(str))
{
Application.LoadLevel(levelSceneNames*);*
*}*
*i++;*
*}*
*GUILayout.EndArea();*
*```*
*<p>}</p>*