Skip to content

Commit

Permalink
Ensure destination exists when recording begins
Browse files Browse the repository at this point in the history
  • Loading branch information
mminer committed May 22, 2021
1 parent f25e929 commit 0adf040
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Editor/BigImageRecorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ namespace UnityEditor.BigImageRecorder
/// </summary>
class BigImageRecorder : GenericRecorder<BigImageRecorderSettings>
{
protected override bool BeginRecording(RecordingSession session)
{
if (!base.BeginRecording(session))
{
return false;
}

Settings.FileNameGenerator.CreateDirectory(session);
return true;
}

protected override void RecordFrame(RecordingSession session)
{
var path = Settings.FileNameGenerator.BuildAbsolutePath(session);
Expand Down

0 comments on commit 0adf040

Please sign in to comment.