//fmc动画,只能合并单材质球的多个对象,不能合并一系列材质球的混合对象. public void UpdateMesh() { //return; //foreach (DictionaryEntry de in materialToMesh) //{ // ArrayList elements = (ArrayList)de.Value; // MeshCombineUtility.MeshInstance[] instances = (MeshCombineUtility.MeshInstance[])elements.ToArray(typeof(MeshCombineUtility.MeshInstance)); for (int i = 0; i < instance.Length; i++) { instance[i].transform = transform.worldToLocalMatrix * filters[instance[i].childIdx].transform.localToWorldMatrix; } // We have a maximum of one material, so just attach the mesh to our own game object if (materialToMesh.Count == 1) { mf.mesh = MeshCombineUtility.CombineEx(instance, generateTriangleStrips, ref element); } else { Debug.LogError("FMCPlayer Mesh Can not "); //MeshFilter filter = (MeshFilter)combinedMesh.GetComponent(typeof(MeshFilter)); //filter.mesh = MeshCombineUtility.Combine(instances, generateTriangleStrips, ref element, true); } //} }