How do I open a link when clicking on text in Unity?

I’m not sure where to start when it comes to opening up a browser/new tab. If I have text that is essentially a button, like any link you’d find online, how do I open up a browser and go to that URL when I click it?

It’s not supported out of the box. Best way to hack it in would be with an invisible button :slight_smile:

That’s what I intended, my question is actually HOW to hack it in. It’s not so much a Unity specific question as a general programming question. Once I’ve clicked my button, what do I do to open up a browser tab?

this doesnt work?

function OnMouseDown () 
{
	Application.OpenURL("http://www.webpage.com");
}

LOL, I didn’t think it would be anywhere near that easy. Thanks!

LOL

Just in case someone else stumbles upon this necro’d thread (seriously? three letters? that’s a new record!), you can use Unity’s latest acquisition - TextMesh Pro - to handle links in text.

By the way the OP hasn’t been seen in four years. :stuck_out_tongue: