Hi, how you could put the code to put a URL link that will load in another browser tab.
Thanks
Hi, how you could put the code to put a URL link that will load in another browser tab.
Thanks
the link above to Application.ExternalCall is a good solution. For example, in your OnMouseDown function call
Application.ExternalCall ("openNewURL");
Then in the HTML call the JS function as:
<script type="text/javascript">
function openNewURL()
{
window.open('http://someURL.com', 'open_window')
}
</script>
That should do the trick. I was looking for the exact same solution to use the browser to download a .pdf from a GUIButton.
Thanks diabloroxx,
But I want a link _blank "(open in the next tab on the browser)
I have this:
Start function () { / / Start a download of The Given URL var www: WWW = new WWW (url);
/ / Wait for download to complete
www yield;
/ / Assign texture
renderer.material.mainTexture = www.texture;
}
OnMouseDown function () { Application.OpenURL (http://unity3d.com/ "); }
but it opens in the same game window.