I would like to present the content on a screen without any scaling (2d
/viewport
, hence I am choosing None
) but with the content not pushed to the top left corner and only showing fixed part of the canvas (1920x1080).
Currently I am using an approach with a custom Camera2D
where I just select AnchorMode = Drag Center
. This almost works. The issue I am having is that if on the canvas (outside the camera) there are any elements (let's say part of the map) they will be presented.
My conclusion is simple: camera gets it size directly from the viewport. If the viewport changes (which is correlated with screen size it seems), the camera will too. This works, of course, for 2d
/viewport
where the camera doesn't change it's size.
I am aiming at changing the scale
basing on the viewport size, so that I correct the size of camera. Is this the right approach to my problem?