Unity web player opening link in new tab


Am currently working on a client project in which I am required to open a link in new tab.
I tried using


where in the page opens up in the current tab.
I also tried


where the page opens in a new pop-up window and is caught by the browsers popup blocker.

Is there any other work around to open links via unity web player?

Thanks in advance.

Get the webplayer to talk to the hosting webpage, and then have Javascript in the html page do what you want.

See: http://docs.unity3d.com/Documentation/Manual/UnityWebPlayerandbrowsercommunication.html

Still impossible to open a new tab in Unity 4.5 ?


finally figure out a way to do it, not sure it will be working in all cases.
have to use Application.ExternalCall in unity and javascript in the page hosting the unity webplayer.

in untiy on the object, add a script (in C#) to trigger on/off signal using a int:

void OnHover (bool isOver) {
//originally using onClick, but it didnt work well with mouseup with the webpage javascript, any one can try using onMouseUp etc other than Hover
    		if (isOver) {
    						Application.ExternalCall ("OpenInNewTab", 1);
    		}else {
    			Application.ExternalCall ("OpenInNewTab", 0);			

the javascript as follow:

    function OpenInNewTab(val) {
    var link=document.getElementById('divID');//the div id enclosing the webplayer 
    link.onmouseup=function() { //originally trigger the signal by onClick in unity, but later i shift to trigger through hover of the div
    if(val==1){ window.open('siteurl');
    // console.log("no");

hope this helps.

Try this method and you wont have any popup block problems. It worked for me


This code in production mode(compiled for webplayer) already open that link ina a new tab.