I have a camera which located on top of the scene. What i want is show the view of the camera at the side of the screen. A little bit like when u click a camera, the block on the right-down corner says camera preview. How can i write a script to do that?

Create a new camera in the Hierarchy panel and set its properties:

  • Normalized View Port Rect: X=0.7, Y=0, W=0.3, H=0.3

  • Depth = 1

This will render the second camera in a rect located at X = 70% of whole screen width, Y = 0 (bottom), width = 30% of whole screen width, height = 30% of whole screen height, and over the main camera (Depth defines the order: higher depth values are rendered over the lower ones)

Remember to delete or disable the Audio Listener in the second camera, or Unity will complain something like “only one audio listener in scene” all the time.