Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Second camera doesn't render in the game window

Discussion in 'Editor & General Support' started by Hector-Xiang, May 7, 2022.

  1. Hector-Xiang

    Hector-Xiang

    Joined:
    May 2, 2014
    Posts:
    4
    Hi all,

    Please correct me if I put the thread at the wrong place.

    I've put two cameras to render the game. One is for the map, the other is for the UI. The map camera's settings are like:
    upload_2022-5-8_0-29-8.png
    The other one is for the UI, the settings:
    upload_2022-5-8_0-29-52.png

    The issue is that the UI camera doesn't render the UI in the game window, but in the scene window:
    upload_2022-5-8_0-32-9.png
    The hierarchy is like this:
    upload_2022-5-8_0-34-21.png
    And the canvas settings are:
    upload_2022-5-8_0-35-13.png

    Is there anyone can help? Thanks in advance!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,960
    It's probably layering / stacking, or else you have both cameras set to clear everything.

    Steps to debug:

    - press play

    - turn OFF the camera that you can see

    - do you see the other one?

    If so, figure out why the layering is wrong.

    If not, then work in the editor (with PLAY paused) until you can see it:

    - make sure it's where you think it is in space, enabled, etc.
     
  3. Hector-Xiang

    Hector-Xiang

    Joined:
    May 2, 2014
    Posts:
    4
    This is very strange. I've been trying this for two days, but nothing worked. I'll keep trying and post the result here if I fix it.