- Home /
Webplayer working offline?
I am attempting to run the webplayer on a machine that is offline (simply disconnected from the internet).
I can run the webplayer when the machine is connected, though as soon as it is disconnected I receive the error message "Failed to update Unity Web Player".
I am using the 30-day trial of Unity Pro if that makes any difference.
While this may certainly work if you have the actual Unity files and are the one exporting it, but what about running files locally that are just corresponding xx.unity3d files? How con someone get these to run locally and not have the web player installer or version checking? We're behind a military firewall, and was given some Unity content that was on a CD, but published as web player files. But, even after modifying browser settings, it keeps trying to run the code in the Unityplayer2.js file, and even if commenting that part out, it still won't load or allow the files to run.
Does anyone have just an example of the bare $$anonymous$$imum embed/object HT$$anonymous$$L coding that will allow the Unity Web Player within IE load content off the local hard drive?
Don't know about IE, but you can just drag a .unity3d file onto Firefox and it will fire up the webplayer fullscreen in that tab.
Answer by cmberryau · Mar 06, 2013 at 04:50 PM
c:\Users{you}\AppData\LocalLow\Unity\WebPlayer
Contains 3 folders
loader mono player
c:\Program Files (x86)\Unity
Contains 2 folders
Editor MonoDevelop
I fixed this problem on another machine (this machine has never connected to the internet) by grabbing the cab file referenced in this answer:
http://answers.unity3d.com/questions/35664/web-player-auto-update-failed.html
After running the executable contained in the .cab there was a size difference between the folders of roughly 24MB. The difference is found in the 'player' folder located in the 'WebPlayer' folder.'The Stable 3.x.x' folder is added to the 'player' folder; now it works. Bizzare.
Answer by Statement · Mar 06, 2013 at 03:01 PM
The trial has nothing to do with it.
See this related answer by Graham: http://answers.unity3d.com/questions/389934/unity3d-offline-streaming-on-web-player.html
Basically, Unity needs to download the player runtime and mono the first time it is run for a specific version of Unity. Once this is done, it can work offline, but it needs to install that first.
When building offline builds make sure you check the "offline deployment" option as otherwise the web page attempts to access UnityObject.js remotely.
So to clarify:
You need to run online once to get the components installed correctly.
You should check "offline deployment" in build settings.
Thanks for taking the time to refer me to that previous answer and for clarifying those points.
Unfortunately after following the steps, a number of times it still fails to work.
I definitely chose offline deployment, ran it first with the internet connected. Following this I ran it once more with the internet disconnected and it fails to run, resulting in the same error message I described earlier.
That's strange. Are you on a PC or $$anonymous$$ac? If you're on a PC, can you poke about in c:\Program Files (x86)\Unity
or c:\Users\{you}\AppData\LocalLow\Unity\WebPlayer
. I'm interested in what folders you have there. You should have loader
, mono
, and player
. Can you tell me what they contain. If on a $$anonymous$$ac, then "it should just work". ;-) For reasons I don't know yet, it sounds as though your machine is trying to get a new player and mono. This might be because you've got the webplayer installed into Program Files, but perhaps do not have permissions to access that, so the html is trying to get you a local copy into AppData.
You can try installing wireshark and check if and what resources are requested. In addition you could try using the Process$$anonymous$$onitor which can tell you which files are being accessed / searched for.
Answer by ptrbrn · Jul 30, 2013 at 09:11 AM
For me it seems it has something to do with what Release Channel is selected in the web player plugin.
I fixed my problem by doing the following:
Make a webbuild (with build option offline deployment turned on)
Turning on internet connection.
Access the web build locally.
Select Release Channel > Release (instead of Stable) by right clicking in the web player.
Turn off the internet connection.
Reload the web player html page.
Hope it works for you too.