End cap on one side only of a Line?

Avatar
  • updated

Can you set an end cap for just the beginning or end of a Line? I am needing to show several line segments connected to one another and still want the round endcaps.

Image 902

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
Freya Holmér creator

right yeah, I suppose you can secretly split one of the colors in two and overlap them, but that might have anti-aliasing implications

Avatar
Dustin M

Thanks for the reply! Yes, I am using tiny z offsets right now, but it doesn't work for if there are only two segments. 

Avatar
Freya Holmér creator

hm, right now there's no way to do that, but you could hack it by having the lines at the ends with rounded caps, and placing them behind the others, either by depth and making use of the Opaque blend mode, or, less ideally, overriding the depth settings, or, if using immediate mode, drawing those ends first