NOA DebuggerNOA Debugger
  • v1.7.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
  • 日本語
  • English
  • v1.7.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
  • 日本語
  • English
  • NoaApiLog

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.
SetDownloadCallbacks(commonCallbacks, apiLogCallbacks)Configure download-related events by creating a custom class and passing it as an argument. For detailed information about the argument, please refer to NoaDownloadCallbacks and NoaApiLogDownloadCallbacks.

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.
OnLogSendThis event is triggered when a log is sent.
It fires when the [send Send] button of the APILog tool is clicked.

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 the events to be executed when downloading logs using a custom-defined class.
        var downloader = new ExampleDownloader();
        var apiLogDownloader = new ExampleApiLogDownloader();
        NoaApiLog.SetDownloadCallbacks(downloader, apiLogDownloader);

        // 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 sent.
        NoaApiLog.OnLogSend += (List<ApiLogEntry> logList) => Debug.Log("Log sent.");

        // Delete all logs.
        NoaApiLog.Clear();

#endif
    }
}