A simple, flexible and user-friendly UI element that can be used for both tooltips and dialogs.
- supported horizontal 4-sides layout
- supported vertical 4-sides layout
- supported simple rect 4-sides layout
- has simple components for extend tooltip behavior
- easy style creation and replacement
- Unity 2020.3 and above
- DOTween (with asmdef: DOTween.Modules)
Add from GitHub in Package Manager Editor Window
- open Package Manager
- click
+ - select
Add from Git URL - paste
https://github.com/AlexZonov/unity-flexible-tooltip.git - click
Add
Add from GitHub in Packages/minifest.json
- open
Packages/minifest.json - add
"com.flexford.unity-flexible-tooltip": "git+https://github.com/AlexZonov/unity-flexible-tooltip.git"+ version if need (#v1.0.0) - save
- Execute
Tools -> Flexible Tooltip -> Install - In project will be add
FlexibleTooltipfolder with configs and assets - You can move this folder and rename
📌 You can change all default assets, but it's not recommended
Config was added after "Install" action and has name FlexibleTooltipConfig.asset
In config need set default assets(prefab and styles).
- Open
Package Manager Window - Select
Flexible Tooltippackage - Choose sample, like example
Overview, clickImportorReimport - Open scene from sample by path
Assets/Samples/Flexible Tooltip/[PACKAGE_VERSION]/[SAMPLE_NAME] - Start play mode
- Execute in scene hierarhy window
Mouse right button -> Flexible Tooltip -> Create - Prepare object in inspector
- Done
- Change base
tooltip.prefab, this file was created afterInstallaction(not recommended) - Create prefab variant, prepare and set in
FlexibleTooltipConfig.assetas default (recommended)
Variant will created relative default prefab from config FlexibleTooltipConfig.asset
You can create new prefab variants for all need cases with different components set:
- Open preffered folder for prefab variants
- Execute in project window
Mouse right button -> Create -> Flexible Tooltip -> Create Prefab Variant - Prepare variant
- Done
- Open preffered folder for prefab variants
- Execute in project window
Mouse right button -> Create -> Flexible Tooltip -> Create StyleNew- create new empty styleDefault(short) variant- create variant of default short styleDefault(medium) variant- create variant of default medium styleDefault(large) variant- create variant of default large style
- Look at default styles settings and sprites import settings
- Make custom sprites like were in default styles
- Prepare your styles settings
- (optional) set as default to config
FlexibleTooltipConfig.asset - Done, you can use style in
FlexibleTooltipcomponent
Main component with general settings and logic
Add hide on click ability for tooltip
Add ability for show\hide tooltip.
Component has debug actions in context menu.
Add ability for restrict tooltip moving in rect
Add ability for auto-move tooltip to target object
Add ability for hide tooltip if target leave from area.
You can set required paddings and enable\disable sides for this logic.