public override void Cleanup() { base.Cleanup(); if (RecordedPlaybackController.Exists()) { RecordedPlaybackController.Instance.Reset(); } }
private IEnumerator PlayRecording(string recordingFileName) { // Load scene var recordingData = RecordedPlaybackPersistentData.GetRecordingData <RecordingInputModule.InputModuleRecordingData>(); RecordedPlaybackPersistentData.RecordedResolution = recordingData.recordedResolution; RecordedPlaybackPersistentData.RecordedAspectRatio = recordingData.recordedAspectRatio; yield return(LoadEntryScene(recordingData)); if (RecordedPlaybackController.Exists()) { // Reset controller if a previous recording just finished playing RecordedPlaybackController.Instance.Reset(); } RecordedPlaybackPersistentData.SetRecordingMode(RecordingMode.Playback, recordingFileName); RecordedPlaybackController.Instance.Begin(); while (!RecordedPlaybackController.IsPlaybackCompleted()) { yield return(null); } EndAutomation(); }