Search Unity

Resolved Cursor rendering behind canvas

Discussion in 'General Graphics' started by ahoffmann, Jan 4, 2021.

  1. ahoffmann

    ahoffmann

    Joined:
    Dec 10, 2018
    Posts:
    10
    I am working on an XR gaze cursor that should always render on top of all other scene objects. But I can't get the cursor to render on top of a world space canvas if the canvas's "order in layer" is set above 0. Can anyone explain why this is happening, and suggest any ways that I could address this?

    The cursor is a textured quad with an Unlit/Transparent shader, with the render queue set to the "overlay" range (4000+). Again, the canvas is in world space mode and it's order in layer is set to 1 or higher. Depth of the cursor relative to the canvas doesn't have any effect on the render order. Unity version is 2019.3.6.

    Here is an example project that demonstrates the issue: Gaze Cursor Render Order Test.zip
     

    Attached Files:

  2. ahoffmann

    ahoffmann

    Joined:
    Dec 10, 2018
    Posts:
    10