- Home /
Question by
Rubenwardy · Jun 22, 2012 at 06:23 PM ·
guibuttontooltip
Tooltip does not show
I created a button with a tooltip, but when the user mouses over, it does not show.
The tooltip text is "Item:"+items[a].name+"("+items[a].quantity+")"
GUI.Button(new Rect(curx,cury,80,80),GUIContent(items[a].name,items[a].icon,"Item:"+items[a].name+"("+items[a].quantity+")"))
Why does this not work? do i have to do it manually?
The parameters:
name is a String
icon is a Texture
Comment
Best Answer
Answer by edrocks4u · Jun 22, 2012 at 06:43 PM
Add this under it
GUI.Label (Rect (10,40,100,40), GUI.tooltip);
Also read the docs for tooltips.
http://unity3d.com/support/documentation/ScriptReference/GUI-tooltip.html