|
I have run into a problem when I change the 800 and 600 to 100%. It does not properly size the window to full screen. Instead I get a squashed screen. html code: unityObject.embedUnity("unityPlayer", "WebPlayer.unity3d", 800, 600, params);
(comments are locked)
|
|
My solution to this problem was to use a small piece of javascript to find the dimentions of the webpag, before creating the unity object, then using thes values as the height and width. Chriz.
That is good, but lacks an event handler to serve the browser window resizing event. I am going to make my own embedding template comprising a bottom div strip of 100% width and some 120px height and the WebPlayer on the top of the page; 100% width, the rest of the heigh. This could be good starting point for that.
Jan 08 '12 at 12:38 PM
tomekkie2
Have been fighting with that quite a bit, added the resize handlers and finally put my findings into the form of blog post: http://virtualplayground.d2.pl/WP/?p=367 Welcome to test, download and use if like.
Feb 23 '12 at 05:57 PM
tomekkie2
(comments are locked)
|
|
Hi Spencer, Yeah it is very hard to get information about the new 3.0 Unity html format I had to go to Wikileaks to get some help (Actually I got some help from some cool Unity guys at Unite 2010) I have finally got something that works. Attached is my template that I am using for full-screen publishing. It also is set up to customize the player load screen to use custom art and turn off the right-click menu pop-up. (Replace the WebPlayer.unity3d with your file and you should be good to go) Have a Merry Christmas - html in your stocking :-) ), Illya
Could you post the entire .html file? I tried a cut and paste into the default template that Unity creates and it didn't work.
Dec 11 '10 at 11:32 AM
bigkahuna
(comments are locked)
|
|
Here is something to add. If you use 100% on size, and you format your graphics (2D) to simply draw based on the screen size(i.e screen.width/2 - (gui/2), etc..) You get a much faster and easier solutions, as no matter what size you stretch your window, the GUI and your product looks fine. If you put the GUI in a PIXEL location, your stuck with that size. (so you get scroll bars if the uses makes the screen smaller, even if you have 100% on the sizes) So in one of my earlier proejcts, it does not resize, but in all my later ones, my GUI is based on screen size location positioning and that is the key to allow unity to use the 100% on the web player. (or at least that is my current conclusion, but as always subject to change based on the facts presented. : ])
(comments are locked)
|
|
Have your user right click on the app and click "Full Screen" Presto Chango
(comments are locked)
|
|
I had to change the tag to:
To get rid of a slight border
(comments are locked)
|
1 2 next page »

I just asked this in a different way as well.