GC Allocation in `Polyline.GetUnpaddedLocalBounds_Internal()`

Avatar
  • updated

I noticed in Polyline.GetUnpaddedLocalBounds_Internal(), it still uses LINQ for calculating min/max positions. I call SetColor on Polyline every frame so it piles up quite fast.

Image 905

Fortunately the fix is very simple. For now I just removed the use of .Select.

Image 906


Reporting a bug? please specify Unity version:
Unity 6000.0.40f1
Reporting a bug? please specify Shapes version:
4.5.1
Reporting a bug? please specify Render Pipeline:
URP