SHA256
Add Custom Output Path API
This commit is contained in:
1 parent
2a5ceb4889
commit
bdc8b4abb0
2 files changed
+10
-4
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using ADOFAIRenderer.Core;
|
||||
using ADOFAIRenderer.Data;
|
||||
using ADOFAIRenderer.Util;
|
||||
@@ -32,7 +33,7 @@ public class RenderSession
|
||||
private bool _screenPatch = true;
|
||||
private Func<bool> _endCondition = () => scrController.instance.state == States.Won;
|
||||
|
||||
private string? _outputPath = null;
|
||||
private string? _outputPath;
|
||||
|
||||
/// <summary>
|
||||
/// Sets whether auto mode is enabled.
|
||||
@@ -92,6 +93,7 @@ public class RenderSession
|
||||
RenderContext.TimePatch = _timePatch;
|
||||
RenderContext.ScreenPatch = _screenPatch;
|
||||
RenderContext.EndCondition = _endCondition;
|
||||
RenderContext.OutputPath = _outputPath;
|
||||
|
||||
RenderManager.Instance.levelPath = levelPath;
|
||||
RenderManager.Instance.Configuration = renderConfig;
|
||||
@@ -99,7 +101,7 @@ public class RenderSession
|
||||
RenderManager.Instance.StartLoadingOverride();
|
||||
|
||||
if (_outputPath is null) RenderManager.Instance.SetupCaptureDirectory();
|
||||
else FileUtil.CreateDirectory(_outputPath);
|
||||
else FileUtil.CreateDirectory(Path.GetDirectoryName(_outputPath) ?? throw new InvalidOperationException());
|
||||
|
||||
RenderManager.Instance.SetupGameScene();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user