I am creating a mesh at runtime from a native plugin by creating a new mesh and calling GetNativeIndexBufferPtr and GetNativeVertexBufferPtr, then filling them in from the native side.
Now I want to import skinning data as well. But when I set renderer.bones from the Unity side, it seems to have no effect, and one time I got an error about the mesh needing to be set read/write at import. (I am not importing it, but I am setting it to be dynamic so that I can fill the vertex and index buffers at runtime from my plugin).
I am guessing that just like setting vertices or indices on a mesh from the Unity side has no effect once you get the native pointers, you can't set the bones. But I would like to confirm this. Is there any way to set the bones on a SkinnedMeshRenderer using a mesh created from a native plugin?
↧