В устройствах Xiaomi нарисовано изображение вне почтового ящика камеры. В других устройствах все правильно. Я прикрепил изображения sumsung и xiaomi, скриншот выглядит уродливо, xiaomi, и хорошо выглядит в samsung
floattargetaspect = 750f / 1334f;
// determine the game window's current aspect ratio
float windowaspect = (float)Screen.width / (float)Screen.height;
// current viewport height should be scaled by this amount
float scaleheight = windowaspect / targetaspect;
// obtain camera component so we can modify its viewport
Camera camera = GetComponent<Camera>();
// if scaled height is less than current height, add letterbox
if (scaleheight < 1.0f)
{
Rect rect = camera.rect;
rect.width = 1.0f;
rect.height = scaleheight;
rect.x = 0;
rect.y = (1.0f - scaleheight) / 2.0f;
camera.rect = rect;
}
![How it suppose to look. It is in Samsung](https://i.stack.imgur.com/8hxW0.png)