Hello,
I’m trying to setup a 3 row by 2 column selection grid with the upper left button initially selected.
My code:
var selectionState :int =0;
var selectionLabels : String[]=["1","2","3","4","5","6"];
function OnGUI ()
{
selectionState = GUI.SelectionGrid(Rect(10,100,100,150),selectionState,selectionLabels,2);
}
However, when I click the play button, button 2 (upper right) is always selected. In fact, it doesn’t matter what number I put in for var selectionState, 2 always starts selected.
Clicking on a button changes it as expected, so it is only the initial setup that is weird.
How do I make it so button 1 (upper left) is the one initially selected?
Thanks.