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

URP Overlay Cameras & EventSystem Priority

Discussion in 'UGUI & TextMesh Pro' started by DigitalSalmon, Mar 2, 2022.

  1. DigitalSalmon

    DigitalSalmon

    Joined:
    Jul 29, 2013
    Posts:
    99
    Just a heads up -

    EventSystem's RaycastComparer method, where event cameras differ, will first check camera.depth.

    A Camera with it's RenderType set to "Overlay" will hide the "priority" field in the inspector.

    That field is the camera.depth.

    To have an Overlay Camera sort at a higher priority for the EventSystem than your Base camera, set your overlay camera RenderType back to Base, give it a high priority, then set it back to Overlay.
     
  2. unity_nBpttdcjGblfGw

    unity_nBpttdcjGblfGw

    Joined:
    Jul 13, 2020
    Posts:
    2
    Thank you, that solved my issue!