When I export my unity model to a html and unity file. I get some standard javascripting, that I can then copy/paste into my html files on the website.
The problem is, that the javascript is somewhat not correct, when one of the scenarios occur.
Script is correct when the visitor has the unity player installed.
But when the visitor doesnât have the unity player, another part of the script is executed and the visitor gets this box - where it says âDownload the unity playerâ
Unfortunately the reading of the website stops after that⌠which mean that all the content that is piled up after the script (further down on the page) wonât be displayed. Which make the website look incomplete.
Take a look here (if you do have the unity player, you wonât see the error though).
www.sapling.dk/interaktion.shtml (not allowed to attach file, so youâll have to check out the source on the website).
In general the sample JavaScript for player detection is rather solid and isnât generally broken so letâs dig a bit deeper into whatâs happening, or not, in your caseâŚ
What do you mean by âthe reading of the website stopsâ? The JavaScript in question only affects the chunk where your Unity content should be displayed. If youâve copied/pasted the code then make sure youâve done it properly. But again, Iâm just not clear on what you mean by âthe reading of the website stopsâ, perhaps you can clarify what you mean by that?
Iâll remove my player and give that a test now.
Edit: back now and I see that your site does get, well, âgoofyâ when the install prompt is displayed. Iâd focus your efforts more on if/how well your site handles the insertion of the installer divs and iFrame. I say that because your site might not integrate the script as-is well enough and so it would likely be worth it to have your web team take a look at that end of things to start. The same set of scripts work just fine elsewhere without interrupting sites, so itâs about sorting out what, if anything is unique to your site.
FYI: I helped write the detection code so if you or your web team needs help Iâm here to offer that!