- Home /
How to make Unity Game fit any resolution when resizing the window?
I've tried Camera.main.orthographicsize = 4.0f, a solid number to stay on but the Orthographic Size of the camera keeps changing it's size after resizing the window when I'm in free aspect Unity editor mode and even when I export the Unity game with 1920x1080(16:9) resolution. I want it to stay the same size when resizing the window so that the game can always fit inside the screen in any resolution when resizing the window. The default blue background of the camera displays when I stretch the window's width far enough which I don't want to happen.
This Youtube video has the results I'm looking for but the code unfortunately is not working on Unity 2019. The code provided from this video does entirely different things for me and doesn't solve my issue. https://www.youtube.com/watch?v=TYNF5PifSmA&list=PLuNkJO3aA7nx8-p1Gj78-Yldz3r7b4By1∈dex=2
Your answer
Follow this Question
Related Questions
resolution is squished horizontal on android 0 Answers
Weird graphic glitch on certain Android devices (2019.2.8f1) 0 Answers
How could I deal with the resolution and camera size? 0 Answers
Android hortographic camera cropping 1 Answer
Why Is My Orthographic Camera Not Rendering at the Full Resolution? 1 Answer