Hey all, I’ve been trying to get Unity to open a new browser window for me, but it’s not working. I can’t figure out why, and have tried a number of methods.
Currently I’m trying to use the following code, which I got from this forum and should work to the best of my knowlege.
var tJSString = "window.open('http://google.com','TestWindow')";
Application.ExternalEval(tJSString);
But it just does nothing. I’ve done tests with making a javascript function in my html header and calling that, and that was a new go as well. Those functions were tested outside of unity and worked.
Anyone got any ideas on this?
Thanks a tonne guys!
[edit]Alright, that was stupid, I unblocked pop-ups and it works fine. It’s still kind of sketchy though. I’ve tested it on two machines… it seems that you have to inititate the function containing the above code multiple times for it to work in firefox (IE has no problems).[/edit]