- Home /
Combining meshes clears old mesh
I have this code: Mesh gridMesh = manager.GetMesh(); Mesh mesh = GridHelper.GetMeshForBlock(1); CombineInstance[] ins = new CombineInstance[1]; ins[0].mesh = mesh; Matrix4x4 trans = new Matrix4x4(); trans.SetTRS(this.position.ToVector3(), GridHelper.RotationToQuaternion(this.rotation), Vector3.one * 100); ins[0].transform = trans; gridMesh.CombineMeshes(ins, true, true);
But whenever I run it, instead of combining the meshes it clears the old mesh and only the "new" one will be in the container. So instead of combining them, it overwrites the old one completely.
Your answer
Follow this Question
Related Questions
skinned mesh renderer, combine meshes can't see the result, what am I doing wrong/ missing? 0 Answers
Combine meshes result in a larger file size on export (GLTF) 1 Answer
CombineMeshes Error on Run-time Meshes 2 Answers
How to merge generated meshes 0 Answers
CombineMeshes() Not Working Properly? 0 Answers