I am wanting to attempt something specific with my 2D images (which the entire game is based off of), which is to have a separate camera render the game window, which is always the same size. Whether this aspect ratio is 1:1 (perfect square) or another form of rectangle is irrelevant right now.
After this, I want two things, which share the same feature. Resizability. I want to be able to
-
Make a GUI that can be customized (resized) in any and all ways by the player. This means any aspect ratio, any rectangle size for any side. Skinny and flat, imperfect square, tall and thin, anything.
-
Resizable game window, which resizes the game with a fixed aspect ratio. If the game window is a perfect square, then I want it to be resizable from 1000x1000 to 500x500 or 600x600 or 1200x1200, or even 1600x1600. With Unity’s Trillear filtering, this is awesome for my 2D images.
Now…I looked up a “fixed aspect ratio” script and attached it to all of my cameras, but it did nothing but stretch the screen based on aspect ratio. So going from 4:3, which is perfect, and changing to 16:9 makes it stretched, and does quite the opposite of fixed aspect ratio.
I used the Camera’s “Normalized View Port Rect” function to shrink the game window to smaller, allowing for the full screen to have borders all around. However, the game window retains the pixel perfect vertical resolution, but refuses to keep the horizontal, because of the aspect ratio differences.
Then there is the matter of allowing players to adjust the Game Window (camera size) based entirely on a GUI border around the camera. I don’t even know where to begin looking in the reference, because of this unique setup.