public static Type GetMeshBuilderType(Type materialType, string[] vertexAttributes) { var tvg = VertexUtils.GetVertexGeometryType(vertexAttributes); var tvm = VertexUtils.GetVertexMaterialType(vertexAttributes); var tvs = VertexUtils.GetVertexSkinningType(vertexAttributes); var meshType = typeof(MeshBuilder <, , ,>); meshType = meshType.MakeGenericType(materialType, tvg, tvm, tvs); return(meshType); }