/*
         * private static void UpdateExportProgress(int stage, int percentage)
         * {
         *  // Fixed: The export stage should be saving mesh model first then extracting collider;
         *  if      (stage == (int)ReconstructionExportStage.STAGE_EXTRACTING_MODEL)    ExportStage = 0;
         *  else if (stage == (int)ReconstructionExportStage.STAGE_COMPACTING_TEXTURE)  ExportStage = 1;
         *  else if (stage == (int)ReconstructionExportStage.STAGE_SAVING_MODEL_FILE)   ExportStage = 2;
         *  else if (stage == (int)ReconstructionExportStage.STAGE_EXTRACTING_COLLIDER) ExportStage = 3;
         *  ExportPercentage = percentage;
         *
         *  if (stage == (int)ReconstructionExportStage.STAGE_EXTRACTING_MODEL)
         *      Debug.Log("Extracting Model: " + percentage + "%");
         *  else if (stage == (int)ReconstructionExportStage.STAGE_COMPACTING_TEXTURE)
         *      Debug.Log("Compacting Textures: " + percentage + "%");
         *  else if (stage == (int)ReconstructionExportStage.STAGE_EXTRACTING_COLLIDER)
         *      Debug.Log("Extracting Collider: " + percentage + "%");
         *  else if (stage == (int)ReconstructionExportStage.STAGE_SAVING_MODEL_FILE)
         *      Debug.Log("Saving Model: " + percentage + "%");
         *
         *  if (ExportStage == 3 && ExportPercentage == 100)
         *  {
         *      IsExportingMesh = false;
         *      Debug.Log("[ViveSR] [RigidReconstruction] Finish Exporting");
         *      //if ((int)Error.WORK != SRWorkModule_API.UnregisterReconstructionCallback())
         *      //    Debug.Log("[ViveSR] [ExportModel] Progress listener failed to unregister");
         *  }
         * }
         */

        public static void UpdateExportProgress()
        {
            ExportError = SRWorkModule_API.GetExportMeshProgress(ref ExportPercentage);
            if (ExportError != (int)Error.WORK || ExportPercentage == 100)
            {
                IsExportingMesh = false;
            }
        }