How to render Rectangle or Line Shapes on top of everything else?

  • updated
  • Answered

Hello.

I'm using Shapes to display debug content in builds and I wonder how to render elements on top of everything else. I saw this post and I was wondering how to do it on Rectangles and Lines... Is there a secret trick here for that to happen?



Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Pinned replies
Freya Holmér
  • Answer
  • Answered

it should work exactly the same as in that post!

if you're in component mode, you set it at the top, set depth test to "always"



if you're in immediate mode, you use:

Draw.ZTest = CompareFunction.Always;
Freya Holmér
  • Answer
  • Answered

it should work exactly the same as in that post!

if you're in component mode, you set it at the top, set depth test to "always"



if you're in immediate mode, you use:

Draw.ZTest = CompareFunction.Always;
laurent victorino

Thanks for your reply and time.

And that's when I realized that I used an old version of Shapes. Sorry for the useless noise. And thanks for the help.