// standard Unity functions function GetUnity () { if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.toLowerCase().indexOf("win") != -1) return document.getElementById("UnityObject"); else if (navigator.appVersion.toLowerCase().indexOf("safari") != -1) return document.getElementById("UnityObject"); else return document.getElementById("UnityEmbed"); } function DetectUnityWebPlayer () { var tInstalled = false; if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.toLowerCase().indexOf("win") != -1) { tInstalled = DetectUnityWebPlayerActiveX(); } else { if (navigator.mimeTypes && navigator.mimeTypes["application/vnd.unity"]) { if (navigator.mimeTypes["application/vnd.unity"].enabledPlugin && navigator.plugins && navigator.plugins["Unity Player"]) { tInstalled = true; } } } return tInstalled; } 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 = "http://webplayer.unity3d.com/download_webplayer-2.x/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; } } function UnityInstall() { var installerPath = GetInstallerPath(); if (installerPath != "") { // Place a link to the right installer depending on the platform we are on. The iframe is very important! Our goals are: // 1. Don't have to popup new page // 2. This page still remains active, so our automatic reload script will refresh the page when the plugin is installed document.write('
\n'); // By default disable ActiveX cab installation, because we can't make a nice Install Now button // if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.toLowerCase().indexOf("win") != -1) if (0) { document.write('Title
'); document.write('Contents
'); document.write("