Esempio n. 1
0
        public static void StopRecordingSequence()
        {
            USRecordSequence orSpawnRecorder = USRuntimeUtility.GetOrSpawnRecorder();

            if (orSpawnRecorder)
            {
                UnityEngine.Object.DestroyImmediate(orSpawnRecorder.gameObject);
            }
        }
Esempio n. 2
0
        public static void StartRecordingSequence(USSequencer sequence, string capturePath, int captureFramerate, int upScaleAmount)
        {
            USRecordSequence orSpawnRecorder = USRuntimeUtility.GetOrSpawnRecorder();

            orSpawnRecorder.StartRecording();
            orSpawnRecorder.RecordOnStart    = true;
            orSpawnRecorder.CapturePath      = capturePath;
            orSpawnRecorder.CaptureFrameRate = captureFramerate;
            orSpawnRecorder.UpscaleAmount    = upScaleAmount;
        }
Esempio n. 3
0
        private static USRecordSequence GetOrSpawnRecorder()
        {
            USRecordSequence uSRecordSequence = UnityEngine.Object.FindObjectOfType(typeof(USRecordSequence)) as USRecordSequence;

            if (uSRecordSequence)
            {
                return(uSRecordSequence);
            }
            GameObject gameObject = new GameObject("Recording Object");

            return(gameObject.AddComponent <USRecordSequence>());
        }
Esempio n. 4
0
        /// <summary>
        /// Gets or Spawns a Recorder Object.
        /// </summary>
        private static USRecordSequence GetOrSpawnRecorder()
        {
            USRecordSequence recorder = Transform.FindObjectOfType(typeof(USRecordSequence)) as USRecordSequence;

            if (recorder)
            {
                return(recorder);
            }

            GameObject recordingObject = new GameObject("Recording Object");

            return(recordingObject.AddComponent <USRecordSequence>());
        }