Show what camera sees in the box.

I kinda need to show minimap, except I found out it just can be plainly dropdown camera couple hundreds miles in the air. But I was wondering, whether I could place camera there and show what it sees in a minified box.

This is possible using RenderTextures.

1 Like

You can also achieve that with the “viewport rect” parameter of the camera, you just have to make a little script that controls camera size(i guess it’ll be ortho…) & viewport based on screen size

1 Like

Following steps are executed:

  • Create a new Render Texture asset using Assets->Create->Render Texture.
  • Create a new Camera using GameObject > Create General > Camera.
  • Assign the Render Texture to the Target Texture of the new Camera.
  • Create a wide, tall and thin box
  • Drag the Render Texture onto it to create a Material that uses the render texture.
  • Enter Play Mode, and observe that the box’s texture is updated in real-time based on the new Camera’s output.

I get stuck at step 5, I can’t drag in into inspector, I can’t drop it on the box in Editor, I can’t drop it anywhere. I do have ready renderer.

Apparently of all random UI types, it required RawImage. Thank you.