Forum rules - please read before posting.

Built Game Not Showing Edges of Scenes

I apologize if this has been discussed elsewhere, but I could not find anything relating to this issue in the forums. This may be an easy fix that I am just missing something, but I feel a little crazy. I have my game working inside the Unity 2018.2.6f1 game viewport. I set up the camera constraints in each scene and they work flawlessly in the viewport. You can see this here - http://www.janinesmoment.com/wp-content/uploads/2018/09/unity_game_viewport.jpg

Now, I need to get this built for the web for my daughter's project, but the players keep cutting off the edges of the screen, so no one can click the door to get out of that room visible in the first picture.

I tried the webgl build, and I have tried many different player settings, but I can find nothing that works. Here is a shot with the default resolution set to 1280 x 720. http://www.janinesmoment.com/wp-content/uploads/2018/09/game_in_webgl.jpg  Notice that the bedroom door is missing completely. The player character cannot walk any further to show the door either, but you can walk to the other side of the room with no issues. It does not show the correct edge on the other side either, but nothing clickable is missing on that side.

When I maximize the WebGL player, you get this. Notice, the door is still missing. http://www.janinesmoment.com/wp-content/uploads/2018/09/game_in_webgl_maximized.jpg

I then did a build out for PC, Stand Alone. When you run the game, it begins windowed. http://www.janinesmoment.com/wp-content/uploads/2018/09/game_in_windowed.jpg The door is missing in this view, but if you maximize the stand alone player, you see enough of the door to click. http://www.janinesmoment.com/wp-content/uploads/2018/09/game_in_windowed_maximized.jpg

So, I do not know what setting I am missing, but I am pulling my hair out. Any assistance with this would be appreciated greatly. My apologies if this is in the wrong section, or if it is a specific Unity forum only question. I did not see anything like this in their forums either, so I am assuming I am missing something simple. Thank you all for your time.





Comments

  • edited September 2018
    Welcome to the community, @jshipman.

    First of all, what version of AC are you using?

    This sounds like a case of the scene logic being dependent on the aspect ratio of your Game window - coupled with the fact that a WebGL build requires the ratio to be determined at the point of build itself.

    Your in-Editor screenshot shows that the Game window has "Free Aspect", so it's using the natural ratio of the window.  Try finding the "proper" aspect ratio that is most similar to that (e.g. 16:9).

    That may affect the constraint values a bit, so once you're settled on an aspect ratio for your game, double check the camera settings so that it still stops at the right point.

    You'll then want to make sure that your builds have a resolution that matches this ratio.  1280x720 would be perfect if the ratio is indeed 16:9.

    For "safety", what you can also do within AC's Settings Manager is enforce the aspect ratio - maintaining constraints and adding letterbox/pillarbox borders if the game window changes to anything else (i.e. by maximising the WebGL player).

    To do this, check Force aspect ratio? underneath "Camera settings", and then enter the ratio (as a decimal) into the Aspect ratio field.  In the case of 16:9, this would be 1.778.

    Also, apologies that your post was auto-flagged into the spam queue.  I've verified your account, so it shouldn't happen again.

  • Update: I knew this was around here somewhere.  Someone had previously asked how to enforce a camera constraint regardless of the aspect ratio.

    Though enforcing the ratio as above should solve it, see this wiki script if interested:
    https://adventure-creator.wikia.com/wiki/Dynamic_2D_camera_limits
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.