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
2
Question by taehunhan · Mar 28, 2011 at 06:23 AM · webplayerresize

Web Player Window height size is too small...

Hi,

I build to Web Player, resolution is 600x450. alt text

And I want like tiger woods pga tour online style. It's pop-up window, available to resize and doesn't resizing under specific size(min size). So, I change html code like below.

unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", "100%", "100%");

but, result is like below picture... alt text

Width is right, height is wrong... And resizing is not working. What's wrong with this?

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

6 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by taehunhan · Mar 28, 2011 at 07:23 AM

I modify html code,

<!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>Unity Web Player | WebPlayer</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") { unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", "100%", "100%");

 }
 --&gt;
 &lt;/script&gt;
 &lt;style type="text/css"&gt;
 &lt;!--
 body {
     font-family: Helvetica, Verdana, Arial, sans-serif;
     background-color: white;
     color: black;
     text-align: center;
 }
 a:link, a:visited {
     color: #000;
 }
 a:active, a:hover {
     color: #666;
 }
 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%;
 }
 --&gt;
 &lt;/style&gt;

</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>

So, resizing is working! And it work perfect in 'google chrome', 'safari', resolution is right. But, it still not work in 'IE8', 'IE9', 'firefox'. I wanna do it in 'IE'.

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 DaveA · Mar 28, 2011 at 07:29 AM 0
Share

IE is slightly different. I have the code on another machine. Unless someone beats me to it, will post in about 12 hours

avatar image
0

Answer by efge · Mar 28, 2011 at 09:08 AM

Set margin and border to zero for "content" and "missing".

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
avatar image
0

Answer by taehunhan · Mar 28, 2011 at 09:42 AM

Thanks to answering. I Set 'margin' and 'border' to zero for "content" and "missing". But, it's still wrong height in 'IE', 'Firefox'.

alt text

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
avatar image
0

Answer by ben 3.du · Apr 18, 2011 at 03:31 AM

yes, it's still wrong height in 'IE8', 'Firefox'.

why?

thanks!

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
avatar image
0

Answer by jahroy · May 12, 2011 at 06:02 AM

Try adding height="100%" to the html element in your css.

That solved the same issue for me in Firefox and IE.

<style>

 html {
     padding: 0px;
     margin: 0px;
     height: 100%;
 }

 &lt;/style&gt;

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
  • 1
  • 2
  • ›

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

1 Person is following this question.

avatar image

Related Questions

Can I change the webplayer size without the need to reload the player? 1 Answer

Avoid WebPlayer AutoResize in browser 1 Answer

Resize webplayer upon window resize 0 Answers

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

Webplayer freezing when inactive 1 Answer


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