- Home /
Is there a way to use SkinnedMeshRenderer.BakeMesh() in multiple threads? (Mesh Instancing)
Hey everyone,
we have a scene with thousands of objects on screen that share instanced meshes. In order to accomplish that, we have created a framework that samples, manages and distributes meshes among objects.
To make things short, the framework implements an Animation component and a SkinnedMeshRenderer component (both disabled at all times), which are manipulated by using Animation.Sample() and SkinnedMeshRenderer.BakeMesh() through a script to sample the meshes that are needed at runtime.
The bottleneck with this implementation is that neither component can be run in a different thread, unity won't allow it, even though they are never updated by unity itself.
Does anyone have any insight regarding how could meshes be sampled through multiple threads?
Thank you in advance for your thoughts!