private void GetMeshIndices()
        {
            MeshGeometry meshGeometry = GetMeshGeometry();

            if (write)
            {
                string json = JsonUtility.ToJson(meshGeometry);

                JsonFileWriter.WriteDataToFile(path: filePath, text: json + "]}", title: "", lastFrame: true);
                recording = false;
                write     = false;
                filePath  = null;
            }
        }
        private MeshGeometry GetMeshGeometry()
        {
            MeshGeometry meshGeometry = new MeshGeometry();

            if (!m_face)
            {
                return(meshGeometry);
            }

            if (TryCopyToList(m_face.vertices, s_Vertices) &&
                TryCopyToList(m_face.indices, s_Indices) &&
                TryCopyToList(m_face.uvs, s_Uvs) && !write)
            {
                meshGeometry.pos     = s_Vertices;
                meshGeometry.indices = s_Indices;
                meshGeometry.uvs     = s_Uvs;
                write = true;
            }

            return(meshGeometry);
        }