Example #1
0
 void stopRecording()
 {
     if (actorRecorder.IsRecording() == true)
     {
         actorRecorder.StopRecording();
     }
 }
Example #2
0
        public IEnumerator StartAndStopRecordingGif_When_Pause_DoesNotCrash()
        {
            yield return(new EnterPlayMode());

            EditorApplication.isPaused = true;
            yield return(null);

            Assert.AreEqual(EditorApplication.isPaused, true);

            var settings = ScriptableObject.CreateInstance <RecorderControllerSettings>();

            settings.SetRecordModeToTimeInterval(0, 20);
            var gifSettings = ScriptableObject.CreateInstance <GIFRecorderSettings>();

            settings.AddRecorderSettings(gifSettings);
            var recorderController = new RecorderController(settings);

            recorderController.PrepareRecording();
            recorderController.StartRecording();
            yield return(null);

            recorderController.StopRecording();
            yield return(new ExitPlayMode());

            UnityObject.DestroyImmediate(settings);
            UnityObject.DestroyImmediate(gifSettings);
        }
 void stopRecording()
 {
     if (filmbackRecorder.IsRecording() == true)
     {
         filmbackRecorder.StopRecording();
         recordingBulb.SetColor("_EmissionColor", Color.black);
     }
 }
Example #4
0
        public void StopRecoreding()
        {
            if (!isRecording)
            {
                return;
            }

            m_RecorderController.StopRecording();
            _onEndRecorded();

            RecordedObjectEntity.take += 1;
        }
Example #5
0
        private IEnumerator Stop()
        {
#if UNITY_EDITOR
#if AT_VIDEO_INIT
            if (mRecorderController != null)
            {
                mRecorderController.StopRecording();
            }
#endif
            yield return(new WaitForSeconds(1));

            UnityEditor.EditorApplication.isPlaying = false;
#else
            yield return(null);
#endif
        }
        public void StartAndStopRecording_WithValidSettings_ShouldStartThenStopRecording()
        {
            var settings      = ScriptableObject.CreateInstance <RecorderControllerSettings>();
            var imageRecorder = ScriptableObject.CreateInstance <AOVRecorderSettings>();

            settings.AddRecorderSettings(imageRecorder);
            var recorderController = new RecorderController(settings);

            Assert.IsTrue(recorderController.StartRecording());
            Assert.IsTrue(recorderController.IsRecording());

            recorderController.StopRecording();
            Assert.IsFalse(recorderController.IsRecording());

            Object.DestroyImmediate(imageRecorder);
            Object.DestroyImmediate(settings);
        }
    // Update is called once per frame
    private void Update()
    {
        if (configOn)
        {
            StartAfterConfig();
        }


        KinectDevice.turnOnOffSkeletons(DrawSkeleton);



        if (!configured || !isRealTime || !animationOn)
        {
            return;
        }

        if (resizeAvatar) //resize avatar
        {
            resizeAvatar = false;
            ResizeAvatar();
        }

        if (startRecording)
        {
            createAnimationRecorder();
            recorder.PrepareRecording();
            recorder.StartRecording();
            startRecording = false;
            isrecording    = true;
        }

        if (stopRecording)
        {
            recorder.StopRecording();
            stopRecording = false;
            isrecording   = false;
        }
    }
Example #8
0
        public void SceneHookGameObject_AfterStartRecording_ShouldBeVisible()
        {
            var settings = ScriptableObject.CreateInstance <RecorderControllerSettings>();
            var recorder = ScriptableObject.CreateInstance <ImageRecorderSettings>();

            settings.AddRecorderSettings(recorder);
            var recorderController = new RecorderController(settings);

            Options.verboseMode = false;             // Make sure visibility is not toggled on because of debugMode.

            Assert.IsTrue(recorderController.StartRecording());
            Assert.IsTrue(recorderController.IsRecording());

            var gameObject = GameObject.Find("Unity-RecorderSessions");

            Assert.IsNotNull(gameObject);
            Assert.IsTrue(gameObject.hideFlags == HideFlags.None);

            recorderController.StopRecording();

            Object.DestroyImmediate(recorder);
            Object.DestroyImmediate(settings);
        }
    private static IEnumerator RecordOneLevel(LevelData level, RecorderLevelEntryPoint entry)
    {
        // Enable the starting UI
        entry.StartingUI.SetActive(true);
        entry.LevelTitle.text = $"Next Level: '{level.Name}'";

        for (int i = entry.CountdownTime; i >= 1; i--)
        {
            entry.CountdownText.text = i.ToString();

            // Set time of current count and create a function to detect when one second has passed
            yield return(new WaitForSeconds(1f));
        }

        // Setup the matrix
        entry.StartingUI.SetActive(false);
        entry.MatrixUI.Setup(level);

        // Start the recording
        RecorderController recorder = GetRecorder(level.Name);

        recorder.PrepareRecording();

        if (!recorder.StartRecording())
        {
            Debug.Log("Failed to start the recording!");
        }

        // Wait until the current matrix is identity
        yield return(new WaitUntil(() => entry.MatrixUI.CurrentMatrix.isIdentity));

        yield return(new WaitForSeconds(entry.EndingTime));

        // Stop the recording
        recorder.StopRecording();
    }
        public IEnumerator StartingAndEndingRecording_IncreasesTakeByOne()
        {
            yield return(new EnterPlayMode());

            var settings = ScriptableObject.CreateInstance <RecorderControllerSettings>();

            settings.SetRecordModeToTimeInterval(0, 20);
            var movSettings = ScriptableObject.CreateInstance <ImageRecorderSettings>();

            settings.AddRecorderSettings(movSettings);
            var recorderController = new RecorderController(settings);

            recorderController.PrepareRecording();
            Assert.AreEqual(1, movSettings.Take);
            recorderController.StartRecording();
            yield return(null);

            recorderController.StopRecording();
            yield return(new ExitPlayMode());

            Assert.AreEqual(2, movSettings.Take);
            UnityObject.DestroyImmediate(settings);
            UnityObject.DestroyImmediate(movSettings);
        }
 void OnDisable()
 {
     m_RecorderController.StopRecording();
 }
Example #12
0
 public void StopRecord()
 {
     m_RecorderController.StopRecording();
 }
Example #13
0
 public void StopRecord()
 {
     TestRecorderController.StopRecording();
     controllerSettings.RemoveRecorder(videoRecorder);
 }