Unity 3.0, full screen web player doesn't seem to be working.

Within my html code I have the following:

   var params = {
	backgroundcolor: "000000",
      	bordercolor: "000000",
      	textcolor: "FFFFFF",
      	logoimage: "MyLogo.png",
      	progressbarimage: "MyProgressBar.png",
      	progressframeimage: "MyProgressFrame.png",
	disableContextMenu: true
   };
   unityObject.embedUnity("unityPlayer", "../../Runtime/Aerodrome.unity3d", "100%", "100%", params);

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?

Thanks,

Hi, welcome to the forum!

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.

Is anyone else experiencing this issue?

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.

396284--13603--$webBUG_true.jpg
396284--13604--$webBUG_false.jpg

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.

<!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>Sky Legends : Smart Bomb Interactive</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",
      	bordercolor: "000000",
      	textcolor: "FFFFFF",
      	logoimage: "MyLogo.png",
      	progressbarimage: "MyProgressBar.png",
      	progressframeimage: "MyProgressFrame.png",
				disableContextMenu: true
			};
			unityObject.embedUnity("unityPlayer", "../../Runtime/Aerodrome.unity3d", "100%", "100%", params);
		}
		-->
		</script>
		<style type="text/css">
		<!--
		body {
			text-align:center;
			padding:0;
			margin:0;
			background-color: black;
			overflow:hidden;
		}
		-->
		</style>
	</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>

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.

bump, is there any information from the Unity side. Can unity confirm or deny that this is a problem with Unity 3.0?

I am facing the same problem. Peter, did you find a solution for this?

I have run into this problem as well … is there a solution?