将做好的unity项目发布成web版本,打开后发现出现的是自定义的unity的loading界面,如果修改成我们自己的的logo图案和加载进度条。
<script type="text/javascript"> var params = { logoimage: "logo.png",//logo progressbarimage: "loading.png",//加载条图片 progressframeimage:"loadbg.png"//加载条背景 }; function GetUnity() { if (typeof unityObject != "undefined") { return unityObject.getObjectById("unityPlayer"); } return null; } if (typeof unityObject != "undefined") { unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d",1270, 600, params); } </script>
<script type="text/javascript"> <!-- ------------------------------------------------------- var config = { width: 1280, height: 660, params: { enableDebugging:"0" } }; var params = { backgroundcolor: "FFFFFF",//背景色 bordercolor: "ffffff",//边框颜色 textcolor: "ffffff",//文本颜色 logoimage: "unitylogo.png",//logo progressbarimage: "unityprogress.png",//加载条 progressframeimage:"unityprogressframe.png"//加载条移动帧 }; var u = new UnityObject2({ params: params } ); ----------------------------------------------------------------------
var params={ backgroundcolor:"ffffff",//背景色 bordercolor:"ffffff",//边框颜色 textcolor:"ffffff",//文本颜色 logoimage:"data.png",//logo progressbarimage:"unityprogress.png",//加载条 progressframeimage:"unityprogressframe.png",//加载条 disableContextMenu:true } var u = new UnityObject2({params:params});
body { font-family: Helvetica, Verdana, Arial, sans-serif; background-color: black; color: white; text-align: center; margin:0px; padding:0px; width:100%; height:100%; }
div#unityPlayer { cursor: default; height: 100%; width: 100%; }
==================== 迂者 丁小未 CSDN博客专栏=================
MyBlog:http://blog.csdn.net/dingxiaowei2013 MyQQ:1213250243
Unity QQ群:858550 cocos2dx QQ群:280818155
====================== 相互学习,共同进步 ===================
转载请注明出处:http://blog.csdn.net/dingxiaowei2013/article/details/18310035
欢迎关注我的微博:http://weibo.com/u/2590571922
需要工程文件的请留言!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。