Open link in new tab from webplayer hosted on any site.

I've searched this site and the unity script reference, but when it comes to linking I can only find out how to either:

  • change the page the web player is on to an other (I want it in a new tab. No killing my game! :p)

  • get unity to give the web page a command and then script into the web page how to respond to this command (by opening a link in a new tab)

What I want is to upload my game to a site I have no control over, yet when you click on a certain button a specified url will be loaded in a new tab. Why is this so hard and why does it seem no one has answered this before? o.O or am I missing something obvious?

TL;DR: Game on not my site. Click button. Open url in new tab. Help! :D

Edit: Still no complete answer, am I going to have to start a bounty? =p

Try this:


(You have to disable pop-up blockers.)

This really isn't the most interesting solution but if the page you are trying to access is your own. You could use the html/javascript to open the pop-up and load the game back. Resuming a game mid-play would require quite some trickery I guess.

Can't wait for actual working answers you guys got ;)

I'm having trouble seeing what you are asking, but I think this will do what you need.

It opens a new tab within your default browser. The url it goes to is what you provide in the parameter.

Edit: Try this command: Application.ExternalEval("'httpcodehere')");