NoaDebugger v1.4.0NoaDebugger v1.4.0
  • v1.6.0
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.0
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • v1.6.0
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.0
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • NoaProfiler

NoaProfiler

Through this class, you can obtain various values from the Profiler function.

APIs

Static Properties

APIDescription
ProfilerInfoReturns the stored Profiler information. If it is in an unmeasured state, the initial value will be entered.
LatestFpsInfoReturns the latest FPS information that was measured. If it is in an unmeasured state, the initial value will be entered.
LatestMemoryInfoReturns the latest Memory information that was measured. If it is in an unmeasured state or if it is in an environment where values cannot be obtained, the initial value will be entered.
LatestRenderingInfoReturns the latest Rendering information that was measured. If it is in an unmeasured state, the initial value will be entered.
LatestBatteryInfoReturns the latest Battery information that was measured. If it is in an unmeasured state or if it is in an environment where values cannot be obtained, the initial value will be entered.
LatestThermalInfoReturns the latest Thermal information that was measured. If it is in an unmeasured state or if it is in an environment where values cannot be obtained, the initial value will be entered.
IsFpsProfilingReturns the current FPS measurement status. You can change the measurement status from this property.
IsMemoryProfilingReturns the current Memory measurement status. You can change the measurement status from this property.
TotalMemoryMBReturns the maximum memory capacity to be measured. You can specify the maximum memory capacity to be measured from this property. If a negative value is specified, it will be the RAM capacity of the device.
IsRenderingProfilingReturns the current Rendering measurement status. You can change the measurement status from this property.
IsBatteryProfilingReturns the current Battery measurement status. You can change the measurement status from this property.
IsThermalProfilingReturns the current Thermal measurement status. You can change the measurement status from this property.

Sample Code

#if NOA_DEBUGGER
using NoaDebugger;
#endif

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

        // Get the profiler information.
        ProfilerInfo profilerInfo = NoaProfiler.ProfilerInfo;

        // Get various measurement information.
        FpsInfo fpsInfo = NoaProfiler.LatestFpsInfo;
        MemoryInfo memoryInfo = NoaProfiler.LatestMemoryInfo;
        RenderingInfo renderingInfo = NoaProfiler.LatestRenderingInfo;
        BatteryInfo batteryInfo = NoaProfiler.LatestBatteryInfo;
        ThermalInfo thermalInfo = NoaProfiler.LatestThermalInfo;

        // Get and set the measurement status.
        bool isFpsProfiling = NoaProfiler.IsFpsProfiling;
        NoaProfiler.IsFpsProfiling = false;

        // Specify the maximum memory capacity to be measured (in MB) .
        NoaProfiler.TotalMemoryMB = 8192.0f;

#endif
    }
}

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.
OnLogCopiedThis event is triggered when a log is copied to the clipboard.
OnLogDownloadThis event is triggered when a log is downloaded.
If the event handler returns true, the logs will be downloaded locally. If the event handler returns false, the logs will not be downloaded.

Sample Code

using System.Collections.Generic;
using UnityEngine;
#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);

        // Set up the event that is triggered when a log is copied to the clipboard
        NoaSnapshot.OnLogCopied += (SnapshotLogRecordInformation log, string clipboardText) => Debug.Log($"Log copied. Clipboard: {clipboardText}");

        // Set up the event that is triggered when a log is downloaded
        NoaSnapshot.OnLogDownload += (string filename, string jsonData) =>
        {
            Debug.Log($"Logs download. Filename: {filename}");
            // Return true to allow local download
            // Return false to prevent local download
            return true;
        };

#endif
    }
}

NoaConsoleLog

Through this class, you can obtain logs held by the ConsoleLog feature.

APIs

Static Methods

APIDescription
Add(LogType, message, stackTrace)Adds a log to be output to the ConsoleLog tool. If stackTrace is not specified, it automatically retrieves the stack trace.
Clear()Deletes all stored log information at once.

Static Properties

APIDescription
LogListReturns a list of the log information it retains.
OnErrorThis is an event that runs when an error is detected.
OnFilterErrorNotificationThis is a delegate that determines whether to display notifications when an error is detected. It will display notifications if it returns true. Please refer to the sample code for specific usage.
OnLogCopiedThis event is triggered when a log is copied to the clipboard.
OnLogDownloadThis event is triggered when a log is downloaded.
If the event handler returns true, the logs will be downloaded locally. If the event handler returns false, the logs will not be downloaded.

Sample Code

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

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

        // Get a list of log information retained by the ConsoleLog function.
        LinkedList<ConsoleLogEntry> consoleLogList = NoaConsoleLog.LogList;

        // Add logs to the ConsoleLog function.
        NoaConsoleLog.Add(UnityEngine.LogType.Error, "log_message", "log_stacktrace");

        // Add logs to the ConsoleLog function (without stack trace).
        NoaConsoleLog.Add(UnityEngine.LogType.Error, "log_message");

        // Set an event to be executed when an error is detected.
        NoaConsoleLog.OnError += (ConsoleLogEntry log) => Debug.Log("Error detected.");

        // Set a delegate to determine whether to display notifications when an error is detected.
        NoaConsoleLog.OnFilterErrorNotification += (ConsoleLogEntry log) => log.LogString.StartsWith("Log to notify an error.");

        // Set up the event that is triggered when a log is copied to the clipboard
        NoaConsoleLog.OnLogCopied += (ConsoleLogEntry log, string clipboardText) => Debug.Log($"Log copied. Clipboard: {clipboardText}");

        // Set up the event that is triggered when a log is downloaded
        NoaConsoleLog.OnLogDownload += (string filename, string jsonData) =>
        {
            Debug.Log($"Logs download. Filename: {filename}");
            // Return true to allow local download
            // Return false to prevent local download
            return true;
        };

        // Delete all logs.
        NoaConsoleLog.Clear();
#endif
    }
}

NoaApiLog

Through this class, you can obtain logs held by the APILog function.

APIs

Static Methods

APIDescription
Clear()Deletes all stored log information at once.

Static Properties

APIDescription
LogListReturns a list of the log information it retains.
OnErrorThis is an event that runs when an error is detected.
OnLogCopiedThis event is triggered when a log is copied to the clipboard.
OnLogDownloadThis event is triggered when a log is downloaded.
If the event handler returns true, the logs will be downloaded locally. If the event handler returns false, the logs will not be downloaded.

Sample Code

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

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

        // Get a list of log information retained by the APILog function.
        LinkedList<ApiLogEntry> apiLogList = NoaApiLog.LogList;

        // Set an event to be executed when an error is detected.
        NoaApiLog.OnError += (ApiLogEntry log) => Debug.Log("Error detected.");

        // Set up the event that is triggered when a log is copied to the clipboard
        NoaApiLog.OnLogCopied += (ApiLogEntry log, string clipboardText) => Debug.Log($"Log copied. Clipboard: {clipboardText}");

        // Set up the event that is triggered when a log is downloaded
        NoaApiLog.OnLogDownload += (string filename, string jsonData) =>
        {
            Debug.Log($"Logs download. Filename: {filename}");
            // Return true to allow local download
            // Return false to prevent local download
            return true;
        };

        // Delete all logs.
        NoaApiLog.Clear();
#endif
    }
}