Hi,
I’ve been working on a project that requires delivery on a CD. The standard detection and install code for the unity plugin requires an internet connection. Is there an offline version available?
If not then I will have to attempt to create an offline version myself. Having looked at the code it would seem that I could replace the tDownloadURL variable with references to offline files.
function GetInstallerPath () {
var tDownloadURL = "";
var hasXpi = navigator.userAgent.toLowerCase().indexOf( "firefox" ) != -1;
// Use standalone installer
if (1)
{
if (navigator.platform == "MacIntel")
tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-2.x/webplayer-i386.dmg";
else if (navigator.platform == "MacPPC")
tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-2.x/webplayer-ppc.dmg";
else if (navigator.platform.toLowerCase().indexOf("win") != -1)
tDownloadURL = "assets\plugins\UnityWebPlayer.exe\UnityWebPlayer.exe";
return tDownloadURL;
}
// Use XPI installer
else
{
if (navigator.platform == "MacIntel")
tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-2.x/UnityWebPlayerOSX.xpi";
else if (navigator.platform == "MacPPC")
tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-2.x/UnityWebPlayerOSX.xpi";
else if (navigator.platform.toLowerCase().indexOf("win") != -1)
tDownloadURL = "http://webplayer.unity3d.com/download_webplayer-2.x/UnityWebPlayerWin32.xpi";
return tDownloadURL;
}
}
The only thing that causes me concern then is none availability of the cab file as defined in the embed tag:
<object id="UnityObject" classid="clsid:444785F1-DE89-4295-863A-D46C3A781394" width="600" height="450" codebase="http://webplayer.unity3d.com/download_webplayer-2.x/UnityWebPlayer.cab#version=2,0,0,0">
<param name="src" value="assets/VLE.unity3d" />
<embed id="UnityEmbed" src="assets/VLE.unity3d" width="500" height="450" type="application/vnd.unity" pluginspage="http://www.unity3d.com/unity-web-player-2.x" />
<noembed>
<div style="text-align:center;">
This content requires the Unity Web Player.[url="http://www.unity3d.com/unity-web-player-2.x"]Install now.[/url]
</div>
</noembed>
</object>
Will just replacing the download links enable this installer to install offline, or does it require an internet connection?
Thanks,
Chromis