Sorting layer and order in layer support

Avatar
  • updated
  • Completed

The ability to set a Sorting Layer and Order in Layer for Shapes components. Useful for organizing the z order with sprites and other components. 

Image 15

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Pinned replies
Avatar
Freya Holmér creator
  • Answer

this has now been implemented! coming in the next update after 1.1.1

Avatar
Freya Holmér creator
  • Planned
Avatar
Freya Holmér creator
  • Answer

this has now been implemented! coming in the next update after 1.1.1

Avatar
Freya Holmér creator
  • Completed
Avatar
stefan wagner

Can this property also be set in immediate mode?

Avatar
Freya Holmér creator
Quote from stefan wagner

Can this property also be set in immediate mode?

no, mostly because immediate mode is more low level than that, it doesn't do any kind of sorting or even culling. Immediate mode draws in the order you tell it to draw (and, in the coming update, at the specific render pipeline injection point you tell it to draw in)

Avatar
stefan wagner
Quote from Freya Holmér

no, mostly because immediate mode is more low level than that, it doesn't do any kind of sorting or even culling. Immediate mode draws in the order you tell it to draw (and, in the coming update, at the specific render pipeline injection point you tell it to draw in)

Thanks for clarification, is it also not possible to use ZOffsetFactor in immediate mode?

I want to draw lines and show a keypoint at each intersection. The keypoint should draw over the part of the line but not overlap the rest of the line. I reproduced this with shape components by using the ZOffsetFactor. But I need this as an dynamic code solution. Or should I just instantiate components instead?

Avatar
Freya Holmér creator
Quote from stefan wagner

Thanks for clarification, is it also not possible to use ZOffsetFactor in immediate mode?

I want to draw lines and show a keypoint at each intersection. The keypoint should draw over the part of the line but not overlap the rest of the line. I reproduced this with shape components by using the ZOffsetFactor. But I need this as an dynamic code solution. Or should I just instantiate components instead?

hm it should be possible to set ZOffsetFactor/Units in immediate mode. Make sure you try negative values and high enough values to make a difference, but, if that's not working then it's a bug!

Avatar
stefan wagner
Quote from Freya Holmér

hm it should be possible to set ZOffsetFactor/Units in immediate mode. Make sure you try negative values and high enough values to make a difference, but, if that's not working then it's a bug!

I build the same setup with components and immediate mode. And ZOffsetFactor (-1000) works only with components and doesn't seem to have an impact in immediate mode. So I officially report a bug. :)

Unity 2020.1.15f1

Shapes 2.3.2