public static void StopRecordingSequence()
        {
            USRecordSequence orSpawnRecorder = USRuntimeUtility.GetOrSpawnRecorder();

            if (orSpawnRecorder)
            {
                UnityEngine.Object.DestroyImmediate(orSpawnRecorder.gameObject);
            }
        }
        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;
        }
        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>());
        }
Exemple #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>());
        }