Stretch Worldspace to Screen Resolution

So oddly enough, I can’t find a question on this, so I can’t find an answer. It seems quite simple however.

I need my world to scale with the user’s resolution. I have an orthographic camera, but changing the resolution instead allows the player to see more of the gameworld. I want a simple boundary that the camera simply stretches to. Is there an option I am missing somewhere? The solution to this seems like it should be nearly script-free.

You probably used the wrong words in your search.
Scaling 2d sprites by screen res


How To Resize Sprite GameObjects To Fit Different Resolutions?

Not sure but you could also try using the Canvas since it has a Canvas Resize script for such cases. You can set it to work with Full HD res and then scale down for better results instead of trying to scale up which is worse.

The only proper way i know to do this is to add black parts on sides of screen.

1- You should choose a safe aspect ration (that is, usually 3:2 on android when you only use landscape)

2- Detect the floaded areas by stretching this aspect ratio to fit one side to corresponding side of screen.

3- Simply make that areas black.

So even user’s monitor gets bigger or aspect ratio changes, users will see the same thing with different sizes.

If you don’t want to resize all elements then the only thing coming to my mind is changing orthographic size. basically the size is half of the height which will be visible so size of 4 means 4 meters will be visible. if you want it to change based on the ratio of the width and height of the screen, you can have a script which changes it, so you don’t show the same amount of content in all ratios but the height will be proportional to your width/height ratio. I don’t know if it is desirable in your case or not however.

I just want to say thank you especially @npatch, through our conversing, I have realized it is as simple as one of your comments implies. Render to texture has been made free for all. The trick is to use multiple cameras and render them to the same target texture, and then stretch that texture to the camera when the user changes by reading the screen dimensions. You simply have to keep the texture resolution high to not lose data. Thank you.