StaticBatchingUtility Read Write Meshs, Recast Mesh Obj

Hello Folks, I’ve finally gotten around to going through the project and marking some meshes static, and Unity has starting batching them together. I’ve just noticed that the meshes that we have RecashMeshObj component can no longer reference the mesh and fail.

Anybody else see something similar? What did you do to fix?

We are generating the graph using colliders not the meshes, so I would have thought it would be OK. Perhaps the component requires mesh?

I think I’ll probably separate the rendering component from the collision for the few problem meshes, but I wonder if RecashMeshObj should try and fallback to the collider if the render mesh is not accessible, or perhaps lookup whether the graph is being generated using mesh or collider?


Yeah. I think it’s not possible for the RecastMeshObj to access the original mesh if it has been statically batched like that. I really should add an option to the RecastMeshObj for if to default to a collider or a rendered mesh. You can put either the rendered mesh or the collider on a child object to force the RecastMeshObject to pick one of them.

I decided to just do a quick hack and force the component to only use the collision since that is all we use on our project.

1 Like