filmov
tv
How to make your text clickable 💛 Unity TextMeshPro and the link tag

Показать описание
This is how you can make your text box contents clickable in Unity and show a tooltip among other things!
In this video, we'll explore the most mysterious tag in TextMeshPro and how to use it to register clicks on your text: the link tag. This tag can enable you to do a lot more than just display a linked URL - think of it as a way to connect your game's systems, rather than just linking to websites. By having your text clickable, you can display tooltips, jump to new entries in the dialogue and much more!
We'll start with a small example project that shows how to use the link tag to create a tooltip that appears when you click on a word or sprite in a text box. In future videos, we'll delve deeper into the link tag and explore some of the other cool things you can do with it like creating a hyperlinked Dialogue or hovering above tagged parts to display extra infos.
In this tutorial, we'll read the tagged word as a keyword. In the next tutorial, we'll use the keyword to look up more infos and see a system where we have no other way than using the keyword instead of the tagged text :)
Stay tuned for more tutorials on the link tag and how to use it in your Unity projects!
💬 Discord 💛
You are very welcome to join!
🛍️ Store links 🛍️
📖 Chapters 🔖
00:00 Text Mesh Pro's link tag - an overview
00:30 The contents of this tutorial
00:40 Preview of the upcoming tutorial on displaying a tooltip on hover
00:53 The base setup of the tutorial scene
01:54 Syntax of the TextMeshPro link tag
02:08 Script nr 1: The Link Handler For TMP Text Monobehaviour
04:14 Script nr 2: The Tooltip Handler Monobehaviour
05:04 Script nr 3: The Tooltip Info struct
05:14 Completing our Tooltip Handler with Tooltip Infos
05:46 Adding a Close Tooltip function
06:12 Filling the list of Tooltip Infos with relevant information
06:24 Tagging relevant parts of our texts with the link tag
06:32 Adding a style to make our linked texts stand out
06:52 Preview of the upcoming video
07:04 Wrapping up the video
#unitytutorial
In this video, we'll explore the most mysterious tag in TextMeshPro and how to use it to register clicks on your text: the link tag. This tag can enable you to do a lot more than just display a linked URL - think of it as a way to connect your game's systems, rather than just linking to websites. By having your text clickable, you can display tooltips, jump to new entries in the dialogue and much more!
We'll start with a small example project that shows how to use the link tag to create a tooltip that appears when you click on a word or sprite in a text box. In future videos, we'll delve deeper into the link tag and explore some of the other cool things you can do with it like creating a hyperlinked Dialogue or hovering above tagged parts to display extra infos.
In this tutorial, we'll read the tagged word as a keyword. In the next tutorial, we'll use the keyword to look up more infos and see a system where we have no other way than using the keyword instead of the tagged text :)
Stay tuned for more tutorials on the link tag and how to use it in your Unity projects!
💬 Discord 💛
You are very welcome to join!
🛍️ Store links 🛍️
📖 Chapters 🔖
00:00 Text Mesh Pro's link tag - an overview
00:30 The contents of this tutorial
00:40 Preview of the upcoming tutorial on displaying a tooltip on hover
00:53 The base setup of the tutorial scene
01:54 Syntax of the TextMeshPro link tag
02:08 Script nr 1: The Link Handler For TMP Text Monobehaviour
04:14 Script nr 2: The Tooltip Handler Monobehaviour
05:04 Script nr 3: The Tooltip Info struct
05:14 Completing our Tooltip Handler with Tooltip Infos
05:46 Adding a Close Tooltip function
06:12 Filling the list of Tooltip Infos with relevant information
06:24 Tagging relevant parts of our texts with the link tag
06:32 Adding a style to make our linked texts stand out
06:52 Preview of the upcoming video
07:04 Wrapping up the video
#unitytutorial
Комментарии