Example #1
0
        void StopRecordingInternal(bool success = true)
        {
            if (RecorderOptions.VerboseMode)
            {
                Debug.Log("Stop Recording.");
            }

            RecorderAnalytics.SendStopEvent(m_RecorderController, !success);
            m_RecorderController.StopRecording();

            m_State      = State.Idle;
            m_FrameCount = 0;

            // Settings might have changed after the session ended
            m_ControllerSettings.Save();

            if (RecorderOptions.exitPlayMode)
            {
                EditorApplication.isPlaying = false;
            }
        }
Example #2
0
        void StartRecordingInternal()
        {
            if (RecorderOptions.VerboseMode)
            {
                Debug.Log("Start Recording.");
            }

            m_RecorderController.PrepareRecording();
            var success = m_RecorderController.StartRecording();

            RecorderAnalytics.SendStartEvent(m_RecorderController);

            if (success)
            {
                m_State      = State.Recording;
                m_FrameCount = 0;
            }
            else
            {
                StopRecordingInternal(false);
                m_State = State.Error;
            }
        }