I’ve pieced together some code snippets for a web player custom loader (Pro), but have 2 issues:
-
The loading bar just loads vertically as 1 pixel…you have to strain to see it (both progressbarimage/progressframeimage are same size; started out with progressbarimage being 1 pixel wide, but same problem)
-
It displays the “unity webplayer install” even though the player is installed and up to date…??? (checked on several machines)
HELP! ![]()
PS can anyone tell me how to display code with line numbers, seems I read a post once many moons ago while looking for something else (as usual), but no success re-finding it…?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Unity Web Player | TrackTest_20110922_CMC</title>
<script type="text/javascript" src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject.js"></script>
<script type="text/javascript">
<!--
function GetUnity() {
if (typeof unityObject != "undefined") {
return unityObject.getObjectById("unityPlayer");
}
return null;
}
if (typeof unityObject != "undefined") {
var params = {
backgroundcolor: "000000", // This part changes the backround color
bordercolor: "000000", // This part changes the border color
textcolor: "FFFFFF", // This part changes the color of some text.
logoimage: "http://clients2.g2mediagroup.com/cmc/cl/TeamGT-logo.png", // What splash logo do you want?
progressbarimage: "http://clients2.g2mediagroup.com/cmc/cl/TeamGT_progbar.png", // What loading bar do you want?
progressframeimage: "http://clients2.g2mediagroup.com/cmc/cl/TeamGT_progframe.png" // What loading bar border do you want?
disableContextMenu: true
};
unityObject.embedUnity("unityPlayer", "TrackTest_20110922_CMC.unity3d", 1024, 768, params);
}
-->
</script>
<style type="text/css">
<!--
body {
font-family: Helvetica, Verdana, Arial, sans-serif;
background-color: black;
color: white;
text-align: center;
}
a:link, a:visited {
color: #bfbfbf;
}
a:active, a:hover {
color: #bfbfbf;
}
p.header {
font-size: small;
}
p.header span {
font-weight: bold;
}
p.footer {
font-size: x-small;
}
div.content {
margin: auto;
width: 1024px;
}
div.missing {
margin: auto;
position: relative;
top: 50%;
width: 193px;
}
div.missing a {
height: 63px;
position: relative;
top: -31px;
}
div.missing img {
border-width: 0px;
}
div#unityPlayer {
cursor: default;
height: 768px;
width: 1024px;
}
-->
</style>
</head>
<body>
<p class="header"><span>Unity Web Player | </span>TrackTest_20110922_CMC</p>
<div class="content">
<div id="unityPlayer">
<div class="missing">
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!">
<img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />
</a>
</div>
</div>
</div>
<p class="footer">« created with <a href="http://unity3d.com/unity/" title="Go to unity3d.com">Unity</a> »</p>
</body>
</html>