unity3d 修改 webplayer 的logo

经过测试,以下两种方式都是可以的。

第一种,加到<script>中

var params = {
        backgroundcolor: "A0A0A0",
        bordercolor: "000000",
        textcolor: "FFFFFF",
        logoimage: "1-0158.png",
        progressbarimage: "1-0122.png",
        progressframeimage: "1-0122.png"
};
unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", 600, 450, params);

第二种,加到<head>中

<object id="UnityObject" classid="clsid:444785F1-DE89-4295-863A-D46C3A781394" width="600" height="450"codebase="http://webplayer.unity3d.com/download_webplayer/UnityWebPlayer.cab#version=2,0,0,0">
    <param name="src" value="WebPlayer.unity3d" /> <!--UNITY3D文件名-->
    <param name="backgroundcolor" value="A0A0A0" /> <!--背景色-->
    <param name="bordercolor" value="000000" /> <!--边线色-->
    <param name="textcolor" value="FFFFFF" /> <!--字体色-->
    <param name="logoimage" value="1-0158.png" /> <!--LOGO文件名-->
    <param name="progressbarimage" value="1-0158.png" /> <!--加载条-->
    <param name="progressframeimage" value="1-0158.png" /> <!--加载条外框-->

    <embed id="UnityEmbed" src="WebPlayer.unity3d" width="600" height="450" type="application/vnd.unity" 

pluginspage="http://www.unity3d.com/unity-web-player-2.x" backgroundcolor="A0A0A0" bordercolor="000000" textcolor="FFFFFF" 

logoimage="1-0158.png" progressbarimage="1-0158.png" progressframeimage="1-0158.png" /> 
</object>

需要说明的是,如果只修改logoimage,但是进度条文件不存在时,logo是不会生效的。

相关推荐