The width comes in at 100% however the height does not. I get a Unity window that is approximately 100 pixel high. Is this a bug or am I missing something?
Just to be clear, are you saying that the visible area is only 100 pixels when you put the webplayer in fullscreen mode? Generally, the HTML doesn’t affect the size of the view when the player goes fullscreen.
Trying to get the web player to take up 100% of the window. Full screen is a bad term that I shouldn’t have used. When trying to get the web player to take up the entire web window I’m having problems. It works for the width, however it doesn’t work for the height.
Actually there are quite a number of issues (ranging from renderglitches with certain camera combinations or image effects up to serious crashbugs) with the webplayer since quite some time. I’ll illustrate just one…
If unity’s window isn’t fully visible it’s either trashed or wrongly rendered, beginning from the top.
If the whole window is visible, everything is fine.
Check that the webplayer’s parent element(s) in the HTML don’t constrain its size. The JS embedding code for the webplayer code doesn’t override these settings.
I don’t have any constraints. Perhaps you could post a very single HTML file that just plays taking up the full screen. I have attached my HTML code below.
The HTML box size model is non-intuitive to regular GUI programmers.
Something that is “100%” tall is only “100%” tall of whatever the available content area might be. If the available content is not big enough to fill the entire window, then the “100% tall” thing won’t fill the window.
The best option in these situations is generally to get the actual window frame size using JavaScript, and use that as the size. Various JavaScript libraries, like jQuery and YUI, attempt to make this easier by providing a single API that “does the right thing” within the different browsers. You might want to check them out!
The problem is that if I specify a size not as a percentage when the page is resized by the user unity doesn’t update. Once again this feature worked great in Unity 2.6 for our game and other like Fusion Fall however just the height seems broken in Unity 3.0. Perhaps there is a problem with my code however I can’t find any examples doing it the Unity 3.0 way, all examples are still in 2.6 and don’t match the 3.0 standard. Perhaps the Unity folks could just post a very simple example launching the web player taking up the entire page and respecting user resizing.