Hey all, just a general question.
I have a script that gets some buttons in my scene and these buttons are called 1,2,3 and so on up two 25.
My script successfully stores these in an array but not from 1 to 25, instead its a random mish mash of number but it is always the same.
How (if I can) make it correctly store them in ascending order.
This is my script so far.
var currentLevel : int;
var icons : GameObject[];
function Start ()
{
currentLevel = PlayerPrefs.GetInt("LevelPlaying");
print(currentLevel);
icons = GameObject.FindGameObjectsWithTag("Icon");
}
function Update () {
}