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
  • NoaToggleUICallbacks

NoaToggleUICallbacks

Configure events related to toggling the visibility of NOA Debugger-related UI.

By passing a class that inherits NoaToggleUICallbacks to NoaController, you can customize events related to the visibility toggle feature for NOA Debugger-related UI.

Overridable Members

Methods

NameDescription
OnBeforeToggleUI(nextIsVisible)Method executed before the NOA Debugger-related UI visibility toggle process. The argument is a bool indicating whether the default NOA Debugger process will show or hide the UI.
OnAfterToggleUI(isVisible)Method executed after the NOA Debugger-related UI visibility toggle process. Executed even if the default NOA Debugger UI visibility toggle process was not executed.

Properties

NameDescription
IsAllowBaseToggleUIDetermines whether to execute NOA Debugger’s UI visibility toggle process. Default is true; if set to false, the NOA Debugger-related UI visibility toggle process is not executed.

Related Types

INoaToggleUICallbacks

The overridable methods and properties of NoaToggleUICallbacks are defined in this interface.

If you want to consolidate multiple callback definitions in a custom class, or add callback functionality while inheriting an existing custom class, you can achieve this by using this interface instead of the NoaToggleUICallbacks class.

Sample Code

#if NOA_DEBUGGER
using NoaDebugger;
using UnityEngine;

// Example of executing events before and after the default NOA Debugger UI visibility toggle process.
public class ExampleNoaDebuggerUIVisibilityManager : NoaToggleUICallbacks
{
    public override void OnBeforeToggleUI(bool nextIsVisible)
    {
        // Example of also executing a visibility toggle for a custom debug tool.
        ExampleDebugger.Instance.SetVisible(nextIsVisible);
    }

    public override void OnAfterToggleUI(bool isVisible)
    {
        // Output the results to the log.
        Debug.Log($"Debugger visibility changed: {isVisible}"");
    }
}

// Example of controlling whether to execute the default NOA Debugger UI visibility toggle process with a custom flag.
public class ExampleOriginalUIVisibilityManager : NoaToggleUICallbacks
{
    bool isAllowBaseToggleUI = true;
    public override bool IsAllowBaseToggleUI => isAllowBaseToggleUI;

    public override void OnBeforeToggleUI(bool nextIsVisible)
    {
        // Example of preventing the default process from executing while staying in a specific scene.
        isAllowBaseToggleUI = ExampleSceneManager.Instance.CurrentScene == SceneType.Loading;
    }
}
#endif

Links

Related Features

  • Launching Tool

Classes Used

  • NoaController