Through this class, you can execute controls from the script, such as obtaining logs held by the Snapshot function, capturing logs, mass disposal of logs, and resetting the elapsed time.
| API | Description |
|---|
| ClearLogsAndTimer() | Disposes of all logs and resets the elapsed time. |
| CaptureLog(label, backgroundColor, hasNoaProfilerInfo, additionalInfo) | Captures the log. Specifies the label and background color to set for the log, whether or not it holds profiler information provided by NOA Debugger, and additional information as parameters. |
| API | Description |
|---|
| LogList | Returns a list of the log information it retains. |
using System.Collections.Generic;
#if NOA_DEBUGGER
using NoaDebugger;
#endif
public class Example
{
void ExampleMethod()
{
#if NOA_DEBUGGER
List<SnapshotLogRecordInformation> snapshotLogList = NoaSnapshot.LogList;
NoaSnapshot.ClearLogsAndTimer();
NoaSnapshot.CaptureLog("label", NoaSnapshot.BgColor.Blue, hasNoaProfilerInfo: true);
var additionalInfo = new Dictionary<string,NoaSnapshotCategory>();
var category = new NoaSnapshotCategory();
var categoryItem1 = new NoaSnapshotCategoryItem
(
key: "SampleKey",
value: "SampleValue",
color: NoaSnapshot.FontColor.Black
);
category.Add(categoryItem1);
var categoryItem2 = new NoaSnapshotCategoryItem
(
key: "SampleKey",
value: "SampleValue2",
color: NoaSnapshot.FontColor.Black
);
category.Add(categoryItem2);
additionalInfo[""] = category;
var category1 = new NoaSnapshotCategory();
var category1Item = new NoaSnapshotCategoryItem
(
key: "SampleKey",
value: "SampleValue",
color: NoaSnapshot.FontColor.Black
);
category1.Add(category1Item);
additionalInfo["Category1"] = category1;
NoaSnapshot.CaptureLog("label", NoaSnapshot.BgColor.Blue, hasNoaProfilerInfo: true, additionalInfo);
#endif
}
}