Tooltip System
  • WELCOME
    • πŸ‘‹Hello
  • πŸ—ΊοΈRoadmap
  • ⛑️Support & Community
  • πŸŽ“Changelog
  • GETTING STARTED
    • πŸ”ŒImport package
    • πŸ““Scene Setup
    • πŸ“šCreating Tooltip UI
    • πŸ“˜Add tooltip content
  • HOW IT WORKS
    • 🧠Tooltip System
    • πŸ”·Tooltip Information
    • πŸ”·Tooltip Display Triggers
    • πŸ”·Tooltip Visuals (UI Prefabs)
    • πŸ”ΆTooltip Positioning
    • πŸ”ΆTooltip Timing and Visibility
    • ♦️Tooltip Animation Controller
    • ♦️Tooltip Layout System
    • 🧩Extensions
Powered by GitBook
On this page
  1. HOW IT WORKS

Tooltip Visuals (UI Prefabs)

Tooltips are rendered using your custom UI prefabs. These are:

  • Based on the ATooltipUI components

  • Shown, hidden and potentially instantiated automatically by the TooltipManager

  • Matched to the type of tooltip data (e.g., text, flexible key-value or custom info)

You can define as many styles as you want and assign them via the TooltipManager.

Out of the box, you'll find:

  • TextTooltipUI – for basic one-line descriptions

  • FlexibleTooltipUI – for dynamic lists of text and/or images (great for stats, resources, etc.)

Custom UI Example

Create custom Tooltip UI component which will supported the new information type.

public class CustomInformationUI : ATooltipUI
{
    private CustomInformation currentInfo;
    
    public override void SetInformation(ATooltipInformation info)
    {
        currentInfo = info as CustomInformation;
        
        // Update your UI elements here...
    }

    public override bool IsInformationSupported(ATooltipInformation info)
    {
        // Validate if information is supported on this UI.
        // For example Flexible tooltip uses identifier for matching in addition info type.
        return info is CustomInformation;
    }
}
PreviousTooltip Display TriggersNextTooltip Positioning

Last updated 4 days ago

πŸ”·