Esempio n. 1
0
    void RecordingExported(long sessionId, string path, Recorder.ErrorCode errorCode)
    {
        if (errorCode == Recorder.ErrorCode.NoError)
        {
            Debug.Log("Recording exported to " + path + ", session id " + sessionId);

#if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
            CopyFileToDesktop(path, "MyAwesomeRecording.mp4");
#elif UNITY_IOS || UNITY_TVOS
            PlayVideo(path);
#endif

            // Sharing.SaveToPhotos(path);
        }
        else
        {
            Debug.Log("Failed to export recording, error code " + errorCode + ", session id " + sessionId);
        }
    }
Esempio n. 2
0
        void RecordingExported(long sessionId, string path, Recorder.ErrorCode errorCode)
        {
            if (errorCode == Recorder.ErrorCode.NoError)
            {
                Debug.Log("Recording exported to " + path + ", session id " + sessionId);

    #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
                CopyFileToDesktop(path, "MyAwesomeRecording.mp4");
    #elif UNITY_IOS ||  UNITY_TVOS
                PlayVideo(path);
    #endif

                // Or save to photos using the Sharing API (triggers save to file dialog on macOS)
                // Remember to uncomment using pmjo.NextGenRecorder.Sharing at the top of the file
                // Sharing.SaveToPhotos(path, "My Awesome Album");

                // Or share using the Sharing API (only available on iOS)
                // Sharing.ShowShareSheet(path, true);
            }
            else
            {
                Debug.Log("Failed to export recording, error code " + errorCode + ", session id " + sessionId);
            }
        }