Avoiding Z-Fighting with the Depth Offset Factor
I have multiple opaque polylines that are Flat 2D. I'm not using immediate mode drawing, instead opting to use gameobjects. I'm setting ZOffsetFactor on the lines in code on creation, but there is still Z-Fighting on the lines.
If I set the Depth Offset Factor in the inspector, then the lines are ordered as expected. Is there some other call I need to make after setting the ZOffsetFactor via code?
Just to add, it seems to be fine for rectangles and discs. The problem seems to be isolated to the polyline as far as I can tell.