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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

No camera "Clear Flags"

Discussion in 'Editor & General Support' started by Josiah_Ironclad, Nov 29, 2019.

  1. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
    I'm trying to have my first person weapon display above terrain by having it on a camera with Clear Flags set to "Depth Only" but apparently that's been replaced with "Background Type" which only has Skybox, Solid Color, and Don't Care as options. Neither of which do what I want.

    I'm using 2019.2.12f1.

    Also I'm using the LWRP template.
     
    Last edited: Nov 29, 2019
  2. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
    Just noticed when I remove the LWRP package, the camera component returns to how it used to be...
    That's a pretty huge trade-off. Either have access to shader graph, or be able to make first person games. Unless someone has a workaround to getting the weapon display thingy to work with LWRP.
     
  3. ChrisKay27

    ChrisKay27

    Joined:
    Jul 18, 2017
    Posts:
    2
    Same issue. Using HDRP though, there is no option for Clear Flags on the camera
     
  4. Josiah_Ironclad

    Josiah_Ironclad

    Joined:
    Sep 24, 2019
    Posts:
    156
    Right after I decided to stick with no render pipeline I found this tutorial which uses render textures.
    Currently working on a game with no need for first person hands/weapons so can't test if it works with the latest versions of Unity and HDRP, but give it a try.
     
  5. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    For anyone coming to this thread with an old camera stacking (ie: One main camera and one child camera with only one layer culling mask and clear flag)
    here is an easy two step conversion for this to work in URP :
    • Set Render type to Overlay in your child camera
    • In the Stack List of your main camera (at the bottom of the properties) click the + to add your child camera (It should be auto-suggested)
    Done. Hope I saved you some hours ! Don't know why it was so hard to find for me xD
     
  6. voronkovmm

    voronkovmm

    Joined:
    Jul 3, 2021
    Posts:
    1
    Qhuhuit, thank you very much
     
  7. Stones_light

    Stones_light

    Joined:
    Jan 20, 2022
    Posts:
    6
    You save me and my project. Thank you