Dear all,
I have a few months of experience with Unity. Usually I’m able to find solutions on the internet to my issues quite fast, but my current problem seems to keep me up for a week now. Thus my first ever question.
I simply want my 2D game/orthographic camera to change its resolution to perfectly fit any screen size by stretching (see first picture). I understand in certain games this would ruin the experience but the kind of games I’m trying to create will be fine with some deformation. This weird resolution is just for demonstration purposes.
I have read countless posts and tried quite some scripts but at the end didn’t find a solution that would achieve this. In other engines I worked with earlier this was a very simple setting on the camera, so I have a feeling this should be doable without much complexity. Definitely without placing every object by script that changes their size one by one to fit the screen.
The latest canvas + camera + script setup I’m trying you can see on below picture. The simple script attached to the camera is this:
Camera.main.aspect = 12f/20f;
In this case the problem is with the panels being limited by the camera while other images finally resize as desired. Ultimately nothing worked well. Could you help me with a solution please? Thanks.