system
1
Looking to download a .pdf when a button is clicked from a GUI Area. This application is targeted for the web player so using
Application.OpenURL ("http://unity3d.com/");
will not work b/c it will direct the current browser away from the Unity application.
Is there something similar to navigateToURL(url, "_blank") or perhaps a better way to do this?
system
3
found a decent solution using Application.ExternalCall For example, in the GUIButton click method 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>
This uses the browser to launch a new window and download the .pdf
_Petroz
2