Sprite shape culling performance

I’m using Sprite Shape in my project and recently I noticed that culling on those elements takes 20ms each frame. The exact profiler entry is SpriteShapeController.OnWillRenderObject with 4692 calls.

I have a few solutions in mind, but I couldn’t find how to implement any of them. I would be grateful for any tips on how to do that, or for any new ideas, maybe they are better than mine.

  1. Turn off culling whatsoever. I wanted to check how my game would preform without culling, but I can’t really find a way to turn it off for sprite shapes. My camera has occlusion culling turned off.
  2. Bake sprite shapes. I don’t really need my sprite shapes to be dynamic and I guess baking them in some way would improve my performance. Setting the static flag does nothing. I would turn off the controllers, but when I do that, then culled shapes don’t show up on the screen. If there is an immediate solution then it would be awesome, but baking all the shapes into a texture is also acceptable. Sadly I don’t know how to start with any of those.

I’m having performance issues too!
Any updates with this?

@Casiell @Ross93 New version of Sprite Shape apparently has mesh baking, but they don’t explain anywhere how to use this. Any updates on your end?

SpriteShapeController now has the BakeMesh() method.

Not sure if it’s too late to answer this question. I am putting this anyways.

In editor, when you enable Edit Spline button, one checkbox appears below Enable Tangents. Using that checkbox, you can cache your geometry and avoid run time recreation.