Beispiel #1
0
        void Update()
        {
            // Click OnStartButton to start recording
            if (isRecording)
            {
                // Compress & save the buffered frames to a gif file. We should check the State
                // of the Recorder before saving, but for the sake of this example we won't, so
                // you'll see a warning in the console if you try saving while the Recorder is
                // processing another gif.
                m_Recorder.Save();

                // Recording completed
                // The start button can be pressed, the finish button can not be pressed
                if (m_IsSaving)
                {
                    // Recording completed
                    isRecording = false;
                    // The start button can be pressed, the finish button can not be pressed
                    FaceTracking.startBtn.SetActive(true);
                    FaceTracking.finishBtn.SetActive(false);
                }

                m_Progress = 0f;
            }
        }
Beispiel #2
0
    public void StartSave(Moments.Recorder recorder, System.Action callback)
    {
        this.callback = callback;

        Canvas.alpha          = 1f;
        Canvas.blocksRaycasts = true;

        StatusText.text = "CREATING GIF...";

        currentProgress = 0f;
        animProgress    = 0f;
        saveFinished    = false;
        fileData        = null;

        recorder.Pause();
        recorder.Save();
        recorder.OnFileSaveProgress += saveProgress;
        recorder.OnFileSaved        += saveCompleted;
    }