- Home /
How to change unity logo in webplayer in unity pro
Hi Everyone i am trying to change unity logo in generated html page but i didn't get. plz give full html code that works with custom logo and what additional things is required like images, images size?
i have tried like this... and refereed this http://docs.unity3d.com/Manual/CustomizingtheUnityWebPlayerloadingscreen.html but i didn't ?
Thank you for your support!!
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>unity logo</title>
<script type='text/javascript' src='https://ssl-webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/jquery.min.js'></script>
<link href="style/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
<!--
var unityObjectUrl = "http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js";
if (document.location.protocol == 'https:')
unityObjectUrl = unityObjectUrl.replace("http://", "https://ssl-");
document.write('<script type="text\/javascript" src="' + unityObjectUrl + '"><\/script>');
-->
</script>
<script type="text/javascript"> ftype='';
**var params = {
backgroundcolor: "A0A0A0",
bordercolor: "000000",
textcolor: "FFFFFF",
logoimage: "Mycustomlogo.png",
progressbarimage: "MyProgressBar.png",
progressframeimage: "MyProgressFrame.png"
};
var u = new UnityObject2({ params: params });**
jQuery(function() {
var $missingScreen = jQuery("#unityPlayer").find(".missing");
var $brokenScreen = jQuery("#unityPlayer").find(".broken");
$missingScreen.hide();
$brokenScreen.hide();
u.observeProgress(function (progress) {
switch(progress.pluginStatus) {
case "broken":
$brokenScreen.find("a").click(function (e) {
e.stopPropagation();
e.preventDefault();
u.installPlugin();
return false;
});
$brokenScreen.show();
break;
case "missing":
$missingScreen.find("a").click(function (e) {
e.stopPropagation();
e.preventDefault();
u.installPlugin();
return false;
});
$missingScreen.show();
break;
case "installed":
$missingScreen.remove();
break;
case "first":
break;
}
});
u.initPlugin(jQuery("#unityPlayer")[0], "V88.unity3d");
});
</script>
<style>
a:link, a:visited {
color: #000;
}
a:active, a:hover {
color: #666;
}
p.header {
font-size: small;
}
p.header span {
font-weight: bold;
}
p.footer {
font-size: x-small;
}
div.content {
margin: auto;
width: 100%;
height:100%;
}
div.broken,
div.missing {
margin: auto;
position: relative;
top: 50%;
width: 193px;
}
#new-frame {display:none;}
div.broken a,
div.missing a {
height: 63px;
position: relative;
top: -31px;
}
div.broken img,
div.missing img {
border-width: 0px;
}
div.broken {
display: none;
}
div#unityPlayer {
cursor: default;
height: 100%;
width: 100%;
}
div#unityPlayer embed {
width:100% !important;
}
</style>
</head>
<body>
<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>
</body>
</html>
Thank you very much $$anonymous$$r. Graham Dunnett.I was checking from local that's why its not working now i put on server so its working thank you again for ur answer and suggestion. please help us as like u helped.
Thanks again sir
Great! Can you mark Graham's comment as an answer and mark it as solved?
Answer by Graham-Dunnett · Oct 13, 2014 at 03:11 PM
Do you have a Mycustomlogo.png on the server? I have:
var config = {
width: 960,
height: 600,
params: {
backgroundcolor: "A0A0A0",
bordercolor: "000000",
textcolor: "FFFFFF",
logoimage: "gjd2.png"
}
};
var u = new UnityObject2(config);
and it "just works". The logo image is just a random png I had on my machine. I put it next to the unity3d file.