Let's use the OnTooltip()
event to show a tooltip for our buttons and different options, as shown in the following screenshot:
The tooltip object shown in the preceding screenshot, which we are going to create, is composed of four elements:
Tooltip: The tooltip container, with the
Tooltip
component attached.Background: The background sprite that wraps around Label.
Border: A yellow border that wraps around Background.
Label: The label that displays the tooltip's text.
We will also make sure the tooltip is localized using NGUI methods.