Forum rules - please read before posting.

Bars displayed on top and bottom of screen in application

Hi all.

I'm having an issue with the build of our game where black bars are added on the top and bottom of the screen. It makes it difficult to play because the cursor goes outside of the game space. It isn't an issue in editor and only shows up in build. Anyone know why this is happening?

Thank you!

Comments

  • Could be an aspect ratio enforcement.

    In the Settings Manager's "Camera" panel, there's an Aspect ratio field - is this set to Fixed or Range? This'll produce top and bottom bars to fit the content to the given ratio.

    This'll occur in the Editor as well, but only if the aspect ratio of the Game window doesn't match the one supplied. Do they appear if you play with the Game window's resolution box at the top-left?

  • edited January 24

    It was set to None Enforced.

    The game looks fine in editor when it's set to None or Ranged, but breaks if it's set to Fixed. When I set it to Fixed, it switches to a camera for a puzzle pack that's also in the project instead, not sure why.. Here is the pack- https://assetstore.unity.com/packages/templates/systems/puzzle-creator-add-puzzles-to-your-game-143274

    I tried a build with it set to Ranged with a wide range and it still has the black bars.

    I'm not sure what to do from here. Thank you for your help!

  • Keep it an None Enforced - that should prevent AC from adding borders.

    If you have another asset that affects the camera, could that be causing them? Create a new scene and initialise it with AC's Scene Manager - do they appear in there?

  • Dear Support Team,

    I am experiencing an issue with your Adventure Creator and would appreciate your assistance.

    A bar is appearing on the left side of the game when running the app on a mobile device in landscape mode. This bar covers the top area of the screen where the network, battery, and other status indicators are displayed.

    This problem occurs only in the app, not in the editor, and specifically in the scene where I have integrated Adventure Creator. I also tried creating a new, empty scene and imported only the basic structure without folders, but the bar still appears on the side of the app.

    Could you please help me resolve this issue?

    Thank you for your support.

    Best regards,

    Abbas Baarudwala

  • Additionally, I experimented with the camera settings by changing the fixed and range options. While this affected the game area on the screen, the bar on the side remained unchanged.

  • Welcome to the community, @cfinhas.

    It may just be a case of unchecking Limit display to 'safe area'? in the Camera settings.

  • already did...
    doesn't make any difference.

  • edited November 29

    Does this bar appear if you create a new scene with just a Camera, no AC, and set that to be your project's first scene in the Build Settings?

    If so, it may be a property of Unity and/or your project, in that case.

    If not, share your AC/Unity versions, as well as details of your mobile device and screenshots of your Settings Manager.

  • no, it does not appear in any other scene.
    I have made a video for you to look at the problem as well as settings
    https://drive.google.com/file/d/1OxQATTO_jI-8r99SpEu8LYChGBV4jSX-/view?usp=sharing

    I am using
    AC : 1.82.1
    Unity: 2023.1.5f1

  • edited November 30

    What device are you using? I cannot recreate such an issue on my end. We'll need to run a few tests on your end to help work out what's going on.

    1. In your project's Player settings, what is the state of the "Hide status bar" option, and does toggling it make a difference? Please share a screenshot of all the settings, if possible.
    2. In your MainCamera, assign AC's default "green" texture in the Fade texture field - is that used to render the black bar?
    3. Separately, does unchecking Draw borders? hide the black bar?
    4. Locate your InGame menu in the Menu Manager, and open the Linked Canvas Prefab, InGameUI. Temporarily remove the Auto-correct UI Dimensions component. Does the "Menu" button at the bottom-left of the screen then move to the corner of the screen (becoming partially obscured by the border if drawn)?
    5. Open up AC's MainCamera script and find the 'DrawBorders' function around line 1058. Just above this line:

      if (!renderBorders)

    Copy/paste:

    GUILayout.Label ("Camera rect: " + Camera.rect + ", AC Safe area: " + ACScreen.safeArea + ", Unity safe area: " + Screen.safeArea);
    

    That will display some debug info in the upper-left corner of the screen at runtime. What's the exact text that it displays?

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.