Why is not my unit's game displayed full size on some devices?

Could someone check why my game screen does not maximize on some devices?

Look at the screenshot :

You see the black background and some UI buttons which should be hidden are appearing? The game background is not maximized on some devices.

I am using 1280 x 720 Resolution. I have set a Pivot and Anchor Point In the Rect Transform. But it seems some devices don't display it well.

What should I do to have it maximized on all device? Any ideas?



I guess you are using UGUI (Unity's built-in GUI system).

Looks like the resulting screen does not match the aspect ratio you used for the UI, so it just rescales evenly until it fits the screen horizontally.

As you can see from the image below, You can have your UI elements scale to fit the screen following different criteria.

Rect Transform Anchors Presets:

If you want your UI to perfectly fit the screen and you don't mind some vertical stretch you might just use the bottom-right option.

However, it's always better to keep in mind the "safe areas" when you design your UI. It's a concept related to TV screens, but I find it extremely useful for mobile products as well, you can get more info here