Performance, improved ShapesMeshGen.cs performance by removing a local lambda

Avatar
  • updated

Hello! We were running into expensive per-frame costs from ShapesMeshGen.GenPolylineMesh. ~12% of the cost came from the local SetUv0 lambda. Replacing this lambda with a standard function reduced the cost to ~6%.

A bit of an older version of Shapes so this may no longer be a relevant change.

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

hm, that's, pretty strange though, it's a local function, not a lambda, I would expect the same performance characteristics :0