Hello!
im trying to make a script that shows amount of buttons(the amount depends on the array). So if I enter 2 for Skills, there will be two buttons on the screen, this is just a start to it, so I havent actually added, a button adder thing, but right now I should have 1 button on my screen, but I dont, it always give me an error “Array out of range” no matter what I do. What should I do? Thanks
public var SkillPos : Rect[];
public var Index : int;
public var Skills : int[];
public var Names : String[];
function Start () {
}
function Update () {
}
function OnGUI () {
GUI.Button(SkillPos[Index], Names[Index]);
}