Exemple #1
0
 private void OnFileSaved(int workerID, string filePath)
 {
     m_IsSaving = false;
     _recorder.Record();
     Debug.Log("GIF saved to " + filePath);
     Debug.Log("ScreenCapture object:\n" + currentScreenCapture.ToString());
 }
Exemple #2
0
        internal void CaptureGif()
        {
            currentScreenCapture = ScriptableObject.CreateInstance <DevLogScreenCapture>();

            currentScreenCapture.productName        = Application.productName;
            currentScreenCapture.version            = Application.version;
            currentScreenCapture.timestamp          = DateTime.Now;
            currentScreenCapture.sceneName          = SceneManager.GetActiveScene().name;
            currentScreenCapture.encoding           = DevLogScreenCapture.ImageEncoding.gif;
            currentScreenCapture.windowName         = "In_Game_Footage";
            currentScreenCapture.name               = Application.productName + " v" + Application.version + currentScreenCapture.timestamp.ToLongDateString();
            currentScreenCapture.AbsoluteSaveFolder = CapturesFolderPath(currentScreenCapture);

            Debug.Log("Created ScreenCapture object:\n" + currentScreenCapture.ToString());

            Recorder.OnPreProcessingDone = OnPreProcessingDone;
            Recorder.OnFileSaved         = OnFileSaved;

            Recorder.SavePath = currentScreenCapture.ImagePath;
            Recorder.Save();
        }