GUI hover not working...

I expect the following to change the text color to white when I move the mouse over the button.

It changes the text color only when the button is depressed.

GUIStyle layerFont;

void OnGUI()
{
        layerFont = new GUIStyle(GUI.skin.button);
        layerFont.fontSize = 16;
        layerFont.normal.textColor = Color.black;
        layerFont.hover.textColor = Color.white;
        GUI.Button(new Rect(54, (i * 26), position.width - 54, 24), "Layer Name", layerFont);
}

You shouldn’t be creating a new GUIStyle every frame in OnGUI. You can just make layerFont a public variable and set the colors in the inspector. (A better name would be layerStyle, though, since it’s not a font, it’s a style.)

–Eric

I moved them into ‘Start()’.

Do you know the answer to the question? Hover still does not work…

Setup also onHover property.