Tooltips
The Tooltip prefab is a simple way to add labels to objects within your scene. This prefab is compatible with the Theming system and includes an animation for show/hide that plays when the component is enabled/disabled.
There are a few features of the Tooltip which are configurable via the Inspector.
Field | Description |
---|---|
Display | The Text/TMP_Text component to display the tooltip text. |
Content | Container for the tooltip container. Used for alignment. |
Alignment | Tooltip alignment |
Billboard Axes | Which axes can be controlled to make the tooltip face the user |
Animation Duration | Show/hide animation duration |
Timeout | Duration that tooltip should remain visible before hiding itself |
The tooltip utility exists as a way to create tooltips via code. By calling these methods you can instantiate the Tooltip Prefab linked in the Immerse SDK UI settings with the given parameters.
using ImmerseSDK.UI.Tooltips;
TooltipUtility.Create(position, "Hello world!");
TooltipUtility.Create(parentTransform, "Hello world!");
Each of these methods will return the Tooltip instance.