I can’t seem to get the tooltips working with SelectionGrid.
When I attach the following script to an empty GameObject the button tooltip works just fine. SelectionGrid does nothing.
Is there something wrong with the code here? I have seen similar implementations in examples that should work just fine.
private var gridContents : GUIContent[] = [
new GUIContent ("First", "Tooltip 1"),
new GUIContent ("Second", "Tooltip 2"),
new GUIContent ("Third", "Tooltip 3")
];
private var selectedIndex = 0;
function OnGUI () {
// create a selectiongrid, tooltips not working
selectedIndex = GUI.SelectionGrid(new Rect(10,10,100,60), selectedIndex, gridContents, 1);
// create a button with exact same content, tooltip is working
GUI.Button(Rect (120,10,100,20), gridContents[0]);
// show tooltip
GUI.Label(Rect (10,120,100,40), GUI.tooltip);
}