Search Unity

Question Phyiscal Camera Viewport should adjust with the UI for different resolution.

Discussion in 'UGUI & TextMesh Pro' started by Raghavendra, Jun 24, 2020.

  1. Raghavendra

    Raghavendra

    Joined:
    Mar 14, 2014
    Posts:
    52
    Hi,

    I have a physical camera in the scene which renders a 3D Scene. The 3D Scene is rendered between the Top UI Bar and the Bottom UI Bar and has been set properly for reference resolution 720 x 1280.

    So, the problem is when the resolution changes, the UI is set properly for that particular resolution. But the 3D scene that is rendered between the 2 UI parts, doesn't sit properly between them. I am attaching 2 reference images for easier understanding.

    The Res1 image is based on the reference resolution and the 3D Scene is properly fit between the 2 UI parts.

    The Res2 image is for another resolution where the UI adjusts itself accordingly.

    So, is there any way i can move the camera according to the resolution so that it fits properly between the UI for different aspect ratios.

    Thank you.
     

    Attached Files: