Tooltips in TextMeshPro Text
Posted: Fri Jun 21, 2019 2:15 pm
I would like to implement some mouse-hover tooltips for my quests. So if mouse placed over item or npc-name inside dialogue, a tooltip with appropriate info will be shown. I googled how to implement tooltips in Unity UI, it looks easy. But straightforward way to do this is just make every word with tooltip a single ui-button with mouse-enter/mouse-exit triggers.
Unfortunately this means that i can not just use one text-mesh-pro for Subtiitle Text panel that just keeps alle subtitle text. So i need to repimplement subtitle fillment to break Subtitle text on words with tooltips, make them separate TextObjects and attach the following text. Straightforward but a little bit hard to implement way. Moreover it could have some side effects with Dialogue System, since having just Text or Text-Mesh-Pro UI-object for subtitles is common way.
So may be there is some another way to implement it, with only using one text-mesh-pro object. Ideally like this:
Any ideas? Or may be there is some another way for context help in dialogue system?
Unfortunately this means that i can not just use one text-mesh-pro for Subtiitle Text panel that just keeps alle subtitle text. So i need to repimplement subtitle fillment to break Subtitle text on words with tooltips, make them separate TextObjects and attach the following text. Straightforward but a little bit hard to implement way. Moreover it could have some side effects with Dialogue System, since having just Text or Text-Mesh-Pro UI-object for subtitles is common way.
So may be there is some another way to implement it, with only using one text-mesh-pro object. Ideally like this:
Code: Select all
Hello adventurer, did you found a <tooltip="id_343">broken sword</tooltip> that i am looking for?