void StartCapture()
    {
        Debug.Log("Capture start - temporarily setting fixed framerate.", this);
        capture_ = new CaptureBuilder();

        string capture_output_folder = output_folder_;

        if (capture_output_folder.Length <= 0)
        {
            capture_output_folder = FileUtil.GetUniqueTempPathInProject();
        }
        Directory.CreateDirectory(capture_output_folder);
        capture_.BeginCapture(this, capture_output_folder, 1, new CaptureStatus());

        // See Time.CaptureFramerate example, e.g. here:
        // https://docs.unity3d.com/ScriptReference/Time-captureFramerate.html
        Time.captureFramerate = 60;
    }
    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_);
    }