NoaDebugger v1.0.0NoaDebugger v1.0.0
  • v1.6.1
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.1
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • v1.6.1
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.1
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • NoaSnapshot

NoaSnapshot

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.

APIs

Static Methods

APIDescription
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.

Static Properties

APIDescription
LogListReturns a list of the log information it retains.

Sample Code

using System.Collections.Generic;
#if NOA_DEBUGGER
using NoaDebugger;
#endif

public class Example
{
    void ExampleMethod()
    {
#if NOA_DEBUGGER

        // Get a list of log information retained by the Snapshot function.
        List<SnapshotLogRecordInformation> snapshotLogList = NoaSnapshot.LogList;

        // Dispose of all logs and reset elapsed time.
        NoaSnapshot.ClearLogsAndTimer();

        // Capture the log.
        NoaSnapshot.CaptureLog("label",  NoaSnapshot.BgColor.Blue, hasNoaProfilerInfo: true);

        // Create a Directory for additional information.
        var additionalInfo = new Dictionary<string,NoaSnapshotCategory>();

        // Set additional information without specifying a category.
        var category = new NoaSnapshotCategory();

        // Item 1 for each category.
        var categoryItem1 = new NoaSnapshotCategoryItem
        (
            key: "SampleKey",
            value: "SampleValue",
            color: NoaSnapshot.FontColor.Black
        );
        category.Add(categoryItem1);

        // Item 2 for each category.
        var categoryItem2 = new NoaSnapshotCategoryItem
        (
            key: "SampleKey",
            value: "SampleValue2",
            color: NoaSnapshot.FontColor.Black
        );

        // Overwrite the value and color when the key is duplicated.
        category.Add(categoryItem2);

        // If no key is specified, it will be managed as an item of Others.
        additionalInfo[""] = category;

        // Set additional information by specifying a category.
        // Additional information for Category 1.
        var category1 = new NoaSnapshotCategory();
        var category1Item = new NoaSnapshotCategoryItem
        (
            key: "SampleKey",
            value: "SampleValue",
            color: NoaSnapshot.FontColor.Black
        );
        category1.Add(category1Item);
        additionalInfo["Category1"] = category1;

        // Capture a log including additional information.
        NoaSnapshot.CaptureLog("label", NoaSnapshot.BgColor.Blue, hasNoaProfilerInfo: true, additionalInfo);

#endif
    }
}