Forum rules - please read before posting.

Camera Rendering letterboxing only in gameplay on iOS

Hello all,

I'm deep into development and running some tests on iOS. In the Game Editor, things render perfectly fine. No letterboxing that covers the UI or anything like that, even when the game window is set to an iPhone resolution.

However, when building the app on an iPhone, there is this strange letterboxing during gameplay. However, when I tap to navigate, you can see that the letterboxing briefly goes away.

When you tap the navigation arrows it fires a cutscene that's set to "Run in Background". Here is a video that shows this:

What's going on here? Where could that letterboxing be coming from? Any thoughts?

  • Jeremy

Comments

  • What are your AC/Unity versions, and what are your Settings Manager's "Camera settings" set to?

    Aside from optionally enforcing an aspect ratio, here you'll also get an option to limit the display to the "safe area", which will rely on Unity's Screen.safeArea property.

    To keep your UI within the playable area of the screen, you'll need to make use of the Auto Correct UI Dimensions component to aligne their positions to the simulated edges/corners, as opposed to the literal screen boundary.

    See the Manual chapter of the same name for details on this component.

  • edited November 2023

    Chris, my apologies. Huge 🤦 over here. It was simply that; in the AC Settings menu, the Camera was set to render a border camera, and the safe area was enabled.

    For anyone seeing this in the future, make sure the following is toggled/untoggled in the AC Settings menu > Camera Settings:

    For iOS (2D games):

    Camera Perspective: 2D
    Moving and turning: classic point and click "Unity 2D"
    Aspect Ratio: Range

    Minimum aspect ratio: 1.333 (this is the 4:3 (iPad) aspect ratio expressed as a single number with a decimal)
    Maximum aspect ratio: 2.1667 (this is the aspect ratio 19.5:9 (iPhone) expressed as a single number with a decimal)

    Render Border Camera: false
    Cache 'Camera.main' variable: depends on your game
    Generate textures in Linear color space: depends on your game
    Limit display to Safe Area: false

    This allows your game to be rendered right up to the edge of the iOS device's screen, and will even be rendered underneath any notch or dynamic island.

    Thanks again for your help, Chris!

  • For anyone seeing this in the future, make sure the following is toggled/untoggled in the AC Settings menu > Camera Settings:

    Great tips, thanks for sharing!

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.