Search Unity

Question DIsable UI layer on camera does not hide UI !?

Discussion in 'UGUI & TextMesh Pro' started by Vagabond_, Jan 15, 2021.

  1. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi,

    is it normal to still have UI rendered in case the layer is disabled in camera or this is probably a bug ?

    I know we have done this before !
    The canvas and all of its children are set to UI layer.

    This is a typical canvas setup for us:
    upload_2021-1-15_19-23-25.png
     
  2. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
  3. OldManAnimal

    OldManAnimal

    Joined:
    Jul 10, 2014
    Posts:
    45
    I believe the canvas render mode 'screen space - overlay' is always rendered since it doesn't rely on the camera. If you set the canvas render mode to 'screen space - camera' and assign a camera to the canvas then the camera should be able to hide the UI layer.
     
  4. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Thanks for the info !

    It would have been so nice if you are able to toggle UI system on/off globally, for recording some gameplay for example without UI and not having to change canvases setup !