Unity Web Player - Bypass Call Home for "fully offline" functionality

Hey everyone!

So I’m fairly new to Unity, but I’ve managed to make a simple game that I’m decently proud of and I want to get my friends in my CompSci class to critique it. Instead of trying to hand out or post a regular Windows or Mac build, I thought “why not build it for Web Player?” Well here’s why not: at our school, unity3d.com is restricted, which means that the required version check in UnityObject2.js can’t finish, so the game never runs. It starts, sure, but it always returns an AutoUpdate error.

So my question is this: is it possible to host all of the required Unity Web Player components on the same website as the game so that no communication with unity3d.com is necessary? Or maybe I should just delete the version check from UnityObject2.js so the game can start regardless?

Any help is appreciated!

This is actually a duplicate of

Usually it’s not possible, but as you can see in the answers to that question with a lot of manual copying it seems to work. Note that the answer is quite old. It’s possible that it doesn’t work anymore with the newest version of Unity.

Also keep in mind that things compiled with Unity beta won’t work either, probably because there’s no webplayer for beta available. At least it didn’t work when i tried the last time :wink:

Okay, so I finally got it working! I don’t know if anyone will have the same problem, but just in case, here’s what I did:

Open the UnityObject2.js file.

Locate the “var a” definition about line 904.

There’s is a subset “definition” (a.archive, line 907) that references unity3d.com. Open a web browser and type in baseDomain + baseDownloadURL + “3.0/jws/UnityWebPlayer.jar” (the full URL would be “http://webplayer.unity3d.com/download_webplayer-3.x/3.0/jws/UnityWebPlayer.jar”). Download that file.

Change that reference in the UnityObject2.js file to just “UnityWebPlayer.jar” because you’ll just upload it to your website in the same directory as the UnityObject2.js file.

Repeat the same procedure for “var p” (p.jnlp_href) on line 919, making sure to upload the .jnlp file to your website and change the reference in the UnityObject2.js file.

Also in the var p definition there is an image “unitylogo.png” that is also referenced. You don’t need this, but to be sure I’d also download it and perform the same procedure as for var a and p.

To my knowledge, those are the only three times in the Offline Build that reference outside sources. Download those for offline access and you’re golden!