- Home /
automatic gui tooltips
how can i get automatic tooltips for various controls within a unity gui? thanks, flexrails
Answer by Ashkan_gc · Dec 03, 2009 at 06:25 PM
there is no way to get automatic tooltip. there is a static variable in GUI class called tooltip. you can set it in calls to functions like GUI.Button() in second argument then you should show the tooltip in a Label or in any other way
this is the sample from unity's documentation in GUI.toolTip page
function OnGUI () { // Make a button using a custom GUIContent parameter to pass in the tooltip. GUI.Button (Rect (10,10,100,20), GUIContent ("Click me", "This is the tooltip"));
// Display the tooltip from the element that has mouseover or keyboard focus GUI.Label (Rect (10,40,100,40), GUI.tooltip); }
there are other examples in the page take a look at http://unity3d.com/support/documentation/ScriptReference/GUI-tooltip.html
Your answer
Follow this Question
Related Questions
tooltip to show from array C# 1 Answer
Why can't I get my tooltip to show only when there is a tooltip set? 2 Answers
How can I create complex tooltips 2 Answers
Display tooltips for objects in scene 1 Answer
tooltip on GUI layout ? 1 Answer