Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
6
Question by Romannn · Oct 16, 2010 at 11:56 AM · webplayercustomizeloader

Customizing the Unity Web Player loading screen

http://unity3d.com/support/documentation/Manual/Customizing%20the%20Unity%20Web%20Player%20loading%20screen.html

I have the Problem i not understand....at witch place i can cahnge this code or write this code...can someone Help....

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by fireDude67 · Oct 26, 2010 at 03:28 AM

Doing this is only possible with Unity Pro, but if you do have Unity Pro (I don't) I think you need to put this part:

var params = { backgroundcolor: "A0A0A0", // 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: "MyLogo.png", // What splash logo do you want? progressbarimage: "MyProgressBar.png", // What loading bar do you want? progressframeimage: "MyProgressFrame.png" // What loading bar border do you want? };

unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", 600, 450, params);

In between in your HTML file.

In unityObject.embedUnity(), I'm not sure what the "unityPlayer" thing is, but "WebPlayer.unity3d" should be replaced with the relative pathname to your unity3d file, 600, 450 are the width/height.

Edit: I think that the "unityPlayer" thing is a way for the browser to know what kind of plugin is needed - change at your own risk.

Edit: Actually, "unityPlayer" is a way for the browser to know which object has the player in it. Credit to the commentator below.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Waz · Feb 03, 2011 at 02:36 AM 1
Share

"unityPlayer" is just the ID of the HT$$anonymous$$L DO$$anonymous$$ object to replace.

avatar image
3
Best Answer

Answer by guel135 · Nov 09, 2010 at 11:05 AM

you need to put this vars in the hmtl generated by unity when you press build&run for example webplayer.html with this code is the part code of the webplayer.html. (u can see it and know what u need to change.

sorry for my english!!

function GetUnity() { if (typeof unityObject != "undefined") { return unityObject.getObjectById("unityPlayer"); } return null; } if (typeof unityObject != "undefined") { var params = { **place to put your code!!!**

     };
     unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", 600, 512, params);
 }
 -->

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image thesfid · Dec 18, 2012 at 09:07 PM 1
Share

EDIT

Just answered my own question by trial and error. The logo image must be a 24-bit PNG. JPGs get ignored. 8-bit PNGs look like dog crap.

Having trouble getting my company logo to show up on the splash screen. Does it have to be PNG or will a JPG work?

avatar image
1

Answer by charans · Aug 21, 2014 at 08:35 AM

Hi Guys

There has been lot of questions & confusions on how to customize the loading screen .There is one generic answer to the solution given above in the link however sometime with new versions this does not work .So after some more R&D below is the complete solution & the script with modification areas.

Online build --- 1. Create a build using unity3d with setting as web player under Build settings . 2. Once build is created browse the folder where the html & unity3d files are created 3. Right click on the html file & edit the areas shown below

 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
         <title>NAME OF THE PROJECT</title>
         <script type='text/javascript' src='https://ssl-webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/jquery.min.js'></script>
             <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">

var params = { backgroundcolor: "ffffff", bordercolor: "6f6e6e", textcolor: "FFFFFF", logoimage: "image.png", (this image should not be bigger then output frame size for e.g if the output frame size is 1024x768 the image should not be bigger then 1000 x 750 else there will be no space left for loading & system will ignore the image- SHOULD BE PLACED IN SAME FOLDER CONTAINING .html & .unity3d) progressbarimage: "Progress_Bar.png",( this will be progress bar design .If using Photoshop cut this on same size as the frame- SHOULD BE PLACED IN SAME FOLDER CONTAINING .html & .unity3d ) progressframeimage: "Progress_Bar_Base.png"(this will be for base of progress bar- SHOULD BE PLACED IN SAME FOLDER CONTAINING .html & .unity3d )

             };
         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], "PROJECT NAME.unity3d");
                });
                
             </script>
         <style type="text/css">
             <!--
             body {
                 font-family: Helvetica, Verdana, Arial, sans-serif;
                 background-color: white;
                 color: black;
                 text-align: center;
                 margin: 0px;(TO REMOVE SOME SPACE ABOVE AND AROUND WHEN PLAYING IN BROWSER)
         padding: 0px;(TO REMOVE SOME SPACE ABOVE AND AROUND WHEN PLAYING IN BROWSER)
             }
         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: 1024px;
         }
         div.broken,
         div.missing {
             margin: auto;
             position: relative;
             top: 50%;
             width: 193px;
         }
         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: 768px;
             width: 1024px;
         }
         -->
             </style>
         </head>
 <body>

Unity Web Player | PROJECT NAME

(CAN BE REMOVED TO HAVE MORE SPACE ON TOP) Unity Web Player. Install now! Unity Web Player. Install now! Restart your browser after install.

« created with Unity »

(CAN BE REMOVED TO HAVE MORE SPACE ON BOTTOM)

When you create this try running this on offline mode see what happens this will not run below is the process for offline creation

Offline build --- 1. Create a build using unity3d with setting as web player under Build settings . 2. Check on the offline deployment option under Build settings 3. Once build is created browse the folder where the html , unity3d & 2 js files are created(jquery.min.js & UnityObject2.js) 4. Right click on the html file & edit the areas shown below

 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <title>Unity Web Player | PROJECT NAME</title>
     <script type='text/javascript' src='jquery.min.js'></script>
     <script type="text/javascript">
     <!--
     var unityObjectUrl = "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">
     <!--
         
             var params = {
                 backgroundcolor: "ffffff",
                 bordercolor: "6f6e6e",
                 textcolor: "FFFFFF",
                 logoimage: "image.png",(SAME AS ABOVE)
                 progressbarimage: "Progress_Bar.png",(SAME AS ABOVE)
                 progressframeimage: "Progress_Bar_Base.png"(SAME AS ABOVE)
             };
         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], "PROJECT NAME.unity3d");
         });
     -->
     </script>
     <style type="text/css">
     <!--
     body {
         font-family: Helvetica, Verdana, Arial, sans-serif;
         background-color: white;
         color: black;
         text-align: center;
         margin: 0px;(SAME AS ABOVE)
         padding: 0px;(SAME AS ABOVE)
     }
     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: 1024px;
     }
     div.broken,
     div.missing {
         margin: auto;
         position: relative;
         top: 50%;
         width: 193px;
     }
     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: 768px;
         width: 1024px;
     }
     -->
     </style>
 </head>
 <body>
     (REMOVED HEADER TO GAIN SPACE)
     <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 class="broken">
                 <a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now! Restart your browser after install.">
                     <img alt="Unity Web Player. Install now! Restart your browser after install." src="http://webplayer.unity3d.com/installation/getunityrestart.png" width="193" height="63" />
                 </a>
             </div>
         </div>
     </div>
     (REMOVED FOOTER TO GAIN SPACE)
 </body>



Hope this will be helpful for all looking for the info..

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Problems with MyLoader.png and 100% fit to page 4 Answers

Custom web player loader 0 Answers

can not Customize web player icon 4 Answers

Unity Free custom web player loader screen 1 Answer

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges