Unity 2D web build not displaying full screen

edited in Questions and Answers
Hi All,

So I have been playing around with Unity's new 2D features and I have been working on a little platformer. I would like to post a new build to the forum, but for some reason the web builds are only displaying half of the screen (that is half of what I see when I run the game in the editor during testing). I have played around with the build settings (resolution mainly), but can't seem to get the web build to display the entire play area/screen size. Any advice? Know it is probably something stupid that I am missing, but is really frustrating so any help will be appreciated.

Comments

  • edited
    Are you testing the game with the correct camera? The in editor view is a different camera to the one that your scene is going to use. Are the scene camera's settings correct?
  • Well I have my editor set up to maximise on play. When I hit play and the game starts, I can see my whole play area that is in my camera's view. But when I create a web build the edges are cut off and I only see half of the play area, as if the camera has moved closer?
  • Would you be able to post a screenshot of the problem?
  • We've had a similar thing with Dead Run, where the web build sometimes start zoomed in, then when the game restarts and goes back to the initial screen everything was fine. I've only ever seen it on the web build and not on our iOS builds so I dismissed it as non-important.
  • This might be a silly question but is the resolution and settings in the webplayer HTML content correct? Also are you using the latest unityobject2 file -> http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js They update it from time to time.

  • edited
    If the aspect ratio of your camera changes (between the editor and the webplayer) then your game might appear zoomed in or zoomed out (because the area that the camera renders is based on the vertical aspect).

    You can test this pretty easily in the editor by forcing the game view's resolution to that of the webplayer.

    Not sure if this is the mistake you're making though, but it sounds like it might fit. Otherwise maybe post some screen shots or more details if the problem isn't resolved?
    Thanked by 2dislekcia Tuism
  • Thanks to all for the advice. Will try suggestions when I get back home tomorrow afternoon and revert with feedback. Much appreciated.
  • @BlackShipsFilltheSky - yeah so you hit the nail on the head. I had my editor set up for "Free Aspect" and my web player was set up for a different resolution. Thanks for pointing me in the right direction. On a seperate note...How do you guys post screenshots to this forum? If I Ctrl + PrtScn it copies a link to the screenshot to my dropbox and then when I paste said link I get this:

    https://www.dropbox.com/s/ec05lhwheketwqb/Screenshot 2014-02-26 19.00.55.png

    Instead of the cool screenshot I see in everyone else's posts. Sorry for all of these noob questions, but i'm sure if I am doing it wrong someone else is struggling too. Again, any help will be appreciated.
  • FanieG said:
    @BlackShipsFilltheSky - yeah so you hit the nail on the head. I had my editor set up for "Free Aspect" and my web player was set up for a different resolution. Thanks for pointing me in the right direction. On a seperate note...How do you guys post screenshots to this forum? If I Ctrl + PrtScn it copies a link to the screenshot to my dropbox and then when I paste said link I get this:

    https://www.dropbox.com/s/ec05lhwheketwqb/Screenshot 2014-02-26 19.00.55.png

    Instead of the cool screenshot I see in everyone else's posts. Sorry for all of these noob questions, but i'm sure if I am doing it wrong someone else is struggling too. Again, any help will be appreciated.
    You need some BBCode leveling up, it seems. To inline images, place your link inside img tags like so:
    [img]https://dl.dropboxusercontent.com/s/ec05lhwheketwqb/Screenshot%202014-02-26%2019.00.55.png[/img]


    It's probably important to note that your normal Dropbox share link for images won't work for hotlinking, and you want the direct URL to the file (the same one you would use to download, as I've linked). I don't know if those links at Dropbox are necessarily permanent, or if Dropbox particularly appreciates hotlinking like this, but that should work.

    You're often better off hosting it somewhere like photobucket, imgur, or one of the other millions of image hosts. If you do that, be aware that all images hosted on imgur and many other image hosts are public, in case you want to share something selectively
Sign In or Register to comment.