Tooltip problem

Hello,

I am new to Unity, so forgive me if I’m asking for something obvious or if this problem is already solved. While experimenting a bit with GUI I came to a problem which I cannot solve. Every time I use GUIContent class with a control, I cannot make tooltips work. Tooltips just don’t appear when i hold mouse cursor over a control. Is there something that has to be checked/initialized?

class GuiMenu : MonoBehaviour {

public  GUISkin skin;

void OnGUI()
{
GUI.Button(new Rect(10, 10, 100, 50), new GUIContent("Add Player", "Adds a player"), skin.button);

}

}

[/code]

Tooltips don’t appear by themselves…it’s up to you to make them (Unity has no way of knowing how you want them to look). The tooltip info only tells you what the tooltip should say.

–Eric

Thanks!

Only thing to do was to add following line to OnGUI method:

if (GUI.tooltip != "") GUI.Label(new Rect(Input.mousePosition.x, Screen.height - Input.mousePosition.y, 200, 40), GUI.tooltip);