private static List <KeyValuePair <string, object> > AnalyzeMesh(Mesh mesh, SerializedObject serializedObject) { var propertys = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("顶点数", mesh.vertexCount), new KeyValuePair <string, object>("面数", (mesh.triangles.Length / 3f)), new KeyValuePair <string, object>("子网格数", mesh.subMeshCount), new KeyValuePair <string, object>("网格压缩", MeshUtility.GetMeshCompression(mesh).ToString()), new KeyValuePair <string, object>("Read/Write", mesh.isReadable.ToString()) }; return(propertys); }
private static List <KeyValuePair <string, object> > AnalyzeMesh(Mesh mesh, SerializedObject serializedObject) { var propertys = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>(AnalyzePropertys.VertexCount, mesh.vertexCount), new KeyValuePair <string, object>(AnalyzePropertys.TriangleCount, (mesh.triangles.Length / 3f)), new KeyValuePair <string, object>(AnalyzePropertys.SubMeshCount, mesh.subMeshCount), new KeyValuePair <string, object>(AnalyzePropertys.MeshCompression, MeshUtility.GetMeshCompression(mesh).ToString()), new KeyValuePair <string, object>(AnalyzePropertys.ReadWrite, mesh.isReadable.ToString()) }; return(propertys); }
public static List <KeyValuePair <string, System.Object> > AnalyzeMesh(Object obj, SerializedObject serializedObject) { Mesh mesh = obj as Mesh; Debug.AssertFormat(mesh != null, "类型不对", obj.name); var propertys = new List <KeyValuePair <string, object> > { new KeyValuePair <string, object>("顶点数", mesh.vertexCount), new KeyValuePair <string, object>("面数", (mesh.triangles.Length / 3f)), new KeyValuePair <string, object>("子网格数", mesh.subMeshCount), new KeyValuePair <string, object>("网格压缩", MeshUtility.GetMeshCompression(mesh).ToString()), new KeyValuePair <string, object>("Read/Write", mesh.isReadable.ToString()) }; return(propertys); }