diff --git a/Runtime/Agents/UGUIMonkeyAgent.cs b/Runtime/Agents/UGUIMonkeyAgent.cs
index 61242e3..857e6c9 100644
--- a/Runtime/Agents/UGUIMonkeyAgent.cs
+++ b/Runtime/Agents/UGUIMonkeyAgent.cs
@@ -9,6 +9,7 @@
using TestHelper.Monkey;
using TestHelper.Monkey.Annotations.Enums;
using TestHelper.Monkey.Random;
+using TestHelper.Monkey.ScreenshotFilenameStrategies;
using TestHelper.Random;
using UnityEngine;
@@ -66,7 +67,11 @@ public class UGUIMonkeyAgent : AbstractAgent
///
public bool defaultScreenshotDirectory = true;
- ///
+ ///
+ /// Directory path for screenshot images. Create a new directory if directory not exists.
+ /// If the value is null or empty,
+ /// Path.Combine(Application.persistentDataPath, "TestHelper.Monkey", "Screenshots") will be used
+ ///
public string screenshotDirectory;
///
@@ -74,7 +79,11 @@ public class UGUIMonkeyAgent : AbstractAgent
///
public bool defaultScreenshotFilenamePrefix = true;
- ///
+ ///
+ /// File name prefix for screenshot images. If the value is null or empty, a default value will be used.
+ /// The default value is the current test name if the agent is running on tests. Otherwise, be a caller method
+ /// name
+ ///
public string screenshotFilenamePrefix;
///
@@ -103,8 +112,11 @@ public override async UniTask Run(CancellationToken token)
Screenshots = screenshotEnabled
? new ScreenshotOptions
{
- Directory = defaultScreenshotDirectory ? null : screenshotDirectory,
- FilenamePrefix = defaultScreenshotFilenamePrefix ? null : screenshotFilenamePrefix,
+ FilePathStrategy = CounterBasedStrategy.Create(
+ Counter.Global,
+ defaultScreenshotDirectory ? null : screenshotDirectory,
+ defaultScreenshotFilenamePrefix ? null : screenshotFilenamePrefix
+ ),
SuperSize = screenshotSuperSize,
StereoCaptureMode = screenshotStereoCaptureMode
}
@@ -150,6 +162,7 @@ public struct RandomStringParametersEntry
///
public CharactersKind CharactersKind;
+
///
/// Returns a
///