public override void OnInspectorGUI()
        {
            serializedObject.Update();

            draw_capture_      = EditorUtility.DrawMethodGroup(draw_capture_, "Capture Settings", DrawCaptureSettings);
            draw_pipeline_     = EditorUtility.DrawMethodGroup(draw_pipeline_, "Pipeline Settings", DrawPipelineSettings);
            draw_import_       = EditorUtility.DrawMethodGroup(draw_import_, "Import Settings", DrawImportSettings);
            draw_scenebuilder_ = EditorUtility.DrawMethodGroup(draw_scenebuilder_, "Scene Builder Settings", DrawSceneBuilderSettings);

            DrawButtons();

            serializedObject.ApplyModifiedProperties();

            // Poll the bake status.
            if (bake_progress_window_ != null && bake_progress_window_.IsComplete())
            {
                bake_progress_window_.Close();
                bake_progress_window_ = null;
                capture_builder_      = null;
                capture_status_       = null;
            }
            if (runner_progress_window_ != null && runner_progress_window_.IsComplete())
            {
                runner_progress_window_.Close();
                runner_progress_window_ = null;
                pipeline_runner_        = null;
                status_interface_       = null;
            }
        }
        public void Capture()
        {
            CaptureHeadbox headbox = (CaptureHeadbox)target;

            string capture_output_folder = headbox.output_folder_;

            if (capture_output_folder.Length <= 0)
            {
                capture_output_folder = FileUtil.GetUniqueTempPathInProject();
            }
            headbox.last_output_dir_ = capture_output_folder;
            Directory.CreateDirectory(capture_output_folder);

            capture_status_  = new EditorBakeStatus();
            capture_builder_ = new CaptureBuilder();

            // Kick off the interactive Editor bake window.
            bake_progress_window_ = (CaptureWindow)EditorWindow.GetWindow(typeof(CaptureWindow));
            bake_progress_window_.SetupStatus(capture_status_);

            capture_builder_.BeginCapture(headbox, capture_output_folder, 1, capture_status_);
            bake_progress_window_.SetupCaptureProcess(headbox, capture_builder_);
        }
 public void SetupStatus(EditorBakeStatus capture_status)
 {
     capture_status_ = capture_status;
     capture_status_.SetGUI(this);
 }