public static void CaptureMesh(AbcAPI.aeObject abc, Mesh mesh, MeshBuffer buf) { buf.indices = mesh.triangles; buf.vertices = mesh.vertices; buf.normals = mesh.normals; buf.uvs = mesh.uv; var data = new AbcAPI.aePolyMeshData(); data.indices = GetArrayPtr(buf.indices); data.positions = GetArrayPtr(buf.vertices); if (buf.normals != null) { data.normals = GetArrayPtr(buf.normals); } if (buf.uvs != null) { data.uvs = GetArrayPtr(buf.uvs); } data.positionCount = buf.vertices.Length; data.indexCount = buf.indices.Length; AbcAPI.aePolyMeshWriteSample(abc, ref data); }