π§ Tooltip System
π Overview
The Tooltip System is designed to let you display UI tooltips across your game with minimal setup. It handles showing, positioning, and hiding tooltips for UI and 3D objects β no custom coding needed.
β
Built-in Features Summary
Auto-hover detection
Detects when the cursor is over tooltip-enabled objects
Delayed display
Optionally show tooltips after a global or per-object delay
Flexible positioning
Follows cursor, anchors to screen or world points
Overflow handling
Automatically flips tooltip when it would go off-screen
Multiple UI styles
Assign different tooltip UIs for different types of content
Works in all canvas modes
Overlay, Camera, and World Space supported
Pause-safe
Tooltips continue to work even when Time.timeScale == 0
Pooling
Tooltip UIs are reused internally to avoid performance issues
π§ͺ No Setup Code Required
In most cases, once youβve added the TooltipManager and a TooltipObject to your GameObject, everything works automatically.
If you want to trigger tooltips manually (e.g., for tutorials), use:
TooltipManager.Current?.ShowTooltip(info, worldPos);Or hide:
π Example Use Cases
Show tutorial tooltips for new players using delayed hover.
Attach flexible item tooltips to world pickups.
Display contextual data overlays in world space for strategy units.
Animate tooltip appearance with a scale + fade combo using your own animation system.
Last updated