Rendering like an emulator

I’m wondering if/how one could render a scene in Unity which (as this is the best way I could describe it) would render the game out like a modern port of an old game. I’m not talking about the TV filters (although as I mention that I am suddenly a bit curious) but how the image is rendered in two parts.

  1. There is a background “wallpaper” image that fills the whole screen.
  2. There is a window that shows the actual game, but it DOES NOT fill the whole screen.

I thought about the idea of just drawing a border around the portion of the screen I want to be “wallpaper,” but that really would not work out right in the end; it would get screwed up depending on the rendered resolution and would be difficult to maintain the camera correctly.

I recall when I first was learning Unity I saw something that said you can have multiple cameras in a scene and then layer what those cameras render on top of each other. Is there a way to set it up so I can have what is rendered not fill the entire screen, but only fill a desired resolution?

Furthermore, I wonder if there is a way I can set up one of those cameras to render to a specific set resolution, and then have that rendered image drawn on the screen (and scaled if necessary)?

Have two cameras, one rendering the game (with a higher depth) and one rendering the wallpaper, and change the viewport rect of the game camera.

–Eric

Viewport rect, okay. That works.
Though annoyingly, I have to supply it values of 0-1, and they are based off of what the overall resolution is, so I gotta do some tricky math bits to get the aspect ratio right, and it won’t be pixel-perfect. But, it’s something.

Is there any way for me to know if the resolution has changed at any moment, apart from manually saving the resolution and checking every frame? Like, is there some function that is called or some call that is made if it is ever changed? I want to be on top of things if the player is playing windowed and they just stretch the window around a bit.

Also, are there any options to draw a GUI onto just one of the cameras?

No.

Use layers and camera culling masks, where the GUI is on a layer that only one camera sees.

–Eric

Thank you for the support!