• 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
Question by phonc · Jul 30, 2011 at 10:43 AM · webplayercustomizepreloader

Problems with MyLoader.png and 100% fit to page

Hi Community,

seems as if I wont solve following 2 Probs on my own:

The MyLoader.png (replaces with "Avatar.jpg" doesn´t work and also the 100% Fit to webpage wont work. Does anybody have an idea why ?

Thanks in advance

Phonc

     <!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>Web Player</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: "Avatar.jpg", // What splash logo do you want?
        // progressbarimage: "MyProgressBar.png", // What loading bar do you want?
        // progressframeimage: "MyProgressFrame.png", // What loading bar border do youwant?
        // disableFullscreen: false
 };
     unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", "100%", "100%", 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: 100%;
             height: 100%;
         }
         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: 100%;
             width: 100%;
         }
         -->
         </style>
     </head>
     <body>
         <p class="header">&nbsp;</p>
         <p class="header">&nbsp;</p>
         <p class="header">&nbsp;</p>
         <p class="header">&nbsp;</p>
         <p class="header">&nbsp;</p>
         <div class="content">
         <td align="center" height="100%">
             <div id="unityPlayer">
               <div class="missing">
                   <a href="http://unity3d.com/webplayer/" title="Unity Web Player. Installieren Sie bitte jetzt!">
                       <img alt="Unity Web Player. Installieren Sie bitte jetzt!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />
                   </a>
                 </div>
             </div>
         </div>
         <p class="footer">&nbsp;</p>
     </body>
 </html>
Comment

People who like this

0 Show 0
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

4 Replies

· Add your reply
  • Sort: 
avatar image

Answer by phonc · Aug 08, 2011 at 07:28 AM

Anybody? I searched the Forum and google and it seems as if it is a problem for many people. It doesn´t seem to be as easy as written in the documentation.

Comment

People who like this

0 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 · Aug 08, 2011 at 09:30 AM 0
Share

Maybe if your question was clearer. I certainly don't understand it.

avatar image

Answer by Waz · Aug 08, 2011 at 09:35 AM

Needs to be PNG, not JPG.

Needs to be pixel value, not percentage.

Fitting to page is hard, but not impossible - you'll have to test and work around many behaviours in different browser versions. It's a question for HTML forums though, not here. I've done it once, but too ugly to show here, sorry.

Basically, you need to dynamically change the unity element size as the window initialises and resizes variously (browsers are quite variable on this). The Unity element is nothing special in this sense, so whatever would work for other fixed-size element will work for the unity element.

Comment

People who like this

0 Show 0 · 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

Answer by phonc · Aug 08, 2011 at 12:13 PM

Yeah, you´re great, man! Thanx a lot.

Comment

People who like this

0 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 phonc · Aug 08, 2011 at 12:15 PM 0
Share

I solved the 100% problem with:

-->

and the Logo.jpg with your hint (logo.png)

avatar image

Answer by sputnik · Dec 09, 2012 at 08:53 PM

Yes it is a problem also for me! I've pro version, customized the html page to pass a logo of mine according the instruction in http://docs.unity3d.com/Documentation/Manual/CustomizingtheUnityWebPlayerloadingscreen.html but logo remains the same. Why????

Comment

People who like this

0 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 AlucardJay · Dec 09, 2012 at 08:53 PM 0
Share

Hi There.

Please don't post comments as answers. Post comments by clicking the [add new comment] button, a window then open for you to type in. Answer fields are for answers only, as this is a knowledge base.

You can convert this answer to a comment (or just edit your original question), you'll also get a better chance of getting an actual answer if the main list shows none or one answer in blue =]

Under the answer where it says edit | delete | more , click on more , then convert to comment

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

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

How to Preload entire web game with a Loading progressbar? 1 Answer

Customizing the Unity Web Player loading screen 3 Answers

can not Customize web player icon 4 Answers

Free work to learn. 4 hours a day, free work to learn 4 hours a day 0 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