Application.OpenURL (); on webplayer to open in a new tab or "_blank"

Hi,

Within web player, the OpenUrl() is sadly lacking the option to define the Target so that we can open a new tab or a new page instead of replacing the content.

Is there a way to do that straight or should I implement this via Application.ExternalCall and write a litle function in javascript?

bye,

Jean

There is no built-in support for this, so yes, you need to implement this using Application.ExternalCall.

Still not possible. Unity 5.1

:slight_smile:

Still not possible.
Unity 4.5

:frowning:

This is terrible!

Please, vote on Unity’s feedback website: https://feedback.unity3d.com/suggestions/target-parameter-for-application … but don’t rise your expectations, this suggestion is there for FIVE years now :frowning:

use the method here Opening links in a Unity WebGL project and add ontouchend to your jslib file, should look like this…

var OpenWindowPlugin = {
    openWindow: function(link)
    {
    	var url = Pointer_stringify(link);
        document.onmouseup = function()
        {
        	window.open("http://www.xenz.org");
        	document.onmouseup = null;
        }
        var url = Pointer_stringify(link);
        document.ontouchend = function()
        {
        	window.open("http://www.xenz.org");
        	document.ontouchend = null;
        }
    }
};

mergeInto(LibraryManager.library, OpenWindowPlugin);

always a pleasure :wink: