I set different text color on different state(normal, hover active) in GUIskin. but it doen’t seem to worked.
when I test it on the GUI.button, the text color is changed fine . but after setting background texture to NONE in GUIskin, the text color doen’t be changed.
is there anyway to change button text color when mouse is over it? but button should has no background image like lable…
This should be entirely possible both by setting the Button information in a GUI skin (would apply to all buttons by default) or by setting a custom GUI Style and applying that to the buttons you want to have this behavior/color.
Can you share your exact settings? I ask that as it all works just fine here (ex: set the Hover state’s text color to red, when I roll over the button the text goes from white to red as expected).
Also, GUI questions should be posted in the UnityGUI area in particular, I’m moving this thread there now…
i just have the same problem. If i set the background to ‘none’ i get no hover state. I dont use a custom style. Here are my settings (all collapsed fields has default values):
void OnGUI ()
{
GUI.skin = customSkin;
if (GUILayout.Button("Start")) {
Debug.Log("You clicked the button!");
}
}
Same problem here: I don’t want a background image, but with the background set to None, the text hover color is ignored. (I’ll use a transparent image as a workaround. Good thought.)