Quantcast
Channel: Questions in topic: "webgl"
Viewing all articles
Browse latest Browse all 2390

How can I modify this script to work with a 3d object like a cube to open a link in a new tab bypassing popup blockers?

$
0
0
Hi, I used this small piece of javascript code to open external links in an old project, but had to instruct the users to allow popup windows to make it work: var setURL : String = "http://www.google.com"; function OnMouseDown():void { Application.ExternalEval("window.open('" + setURL + "')"); } Now I'm trying to make use of the example provided in [https://github.com/valyard/UnityWebGLOpenLink][1] This example is for making buttons open external links, but I need to transform it in someway that I can attach it to a 3d object like a cube, where I can define the URL to be opened for each element, and make the call to the plugin when the player clicks on the cube. Thanks in advance for any help! Regards, German Acevedo Working on Unity3d 5.3.4f1 Professional Build target: WebGL

Viewing all articles
Browse latest Browse all 2390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>