Goal: Make x1-xn camera zoom to reach pixel perfect camera scale.
What i do:
float zoomFactor = 3f;
Rect rect = new Rect(0.25f,0.25f, 0.75f,0.75f); // pseudo-values for example
_gameplayCamera.CameraSettings.rect = rect;
_gameplayCamera.ZoomFactor = zoomFactor ;
Result: Everything works as i expect in Unity Editor:
Issue: Hovewer, it doesn't work when i run game build. Any ZoomFactor looks same - upscaled to fit screen.
All overrides for camera switched off:
IMPORTANT NOTE:The issue only appears when i change _gameplayCamera.CameraSettings.rect
Any thoughts what it is?