How to open a URL from a text box with Unity Text Mesh Pro ?

Uploaded by Christina Creates Games
Share: Twitter Facebook
#unitytutorial
Opening a website (URL) by clicking on a text in a Text Mesh Pro Text box is simple! It works by utilizing the link-tag provided by Text Mesh Pro and we need to check if the tagged element at our mouse position actually contains a link tag, for which we will use a Link Handler we created in a different video.

Just add a hand full lines of code to the LinkHandler we created in this video: https://www.youtube.com/watch?v=N6vYyCahLr8 (that one teaches you how to make parts of your text clickable. If you really only need it for a link, just remove the event at the bottom of the script.)

Making clickable URLs is only one of the possible use cases of the link tag!

-- Chapters --
00:00 How our clickable URL will look and behave
00:16 How the system is set up
00:33 Using the LinkHandler as a base
00:50 The code for checking if the link-tagged element contains a URL and if it does, open it in the browser
01:14 Wrapup