Display size

How a can make game with not all screen in horizontal orientation? I need black bars on the left and right sides like on the picture.

This is the default letterbox mode no ?

So what i can do with this? Use only all screen size? Because some phones have a front camera on display (like on the picture) and i don’t wanna use this place in my game.

I would say that you don’t really want black bars on the side. You would want your background to cover the whole screen, but position your UI/game elements in such a way that they would not end up in those unwanted areas.

You would probably want to use display.safeScreenOriginX and display.safeActualContentWidth as the variables to alignment objects on your left and right side of screen.

The following article shines light on this:

Thanks! I’ll try it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.