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

NoaApplicationResetCallbacks

Configure events related to the application reset feature.

By passing a class that inherits NoaApplicationResetCallbacks to NoaController, you can customize events related to the application reset feature.

Overridable Members

Methods

NameDescription
OnBeforeApplicationReset()Executed before the application reset process.
OnAfterApplicationReset()Executed after the application reset process. Executed even if NOA Debugger’s application reset process was not executed.

Properties

NameDescription
IsAllowBaseApplicationResetDetermines whether to execute NOA Debugger’s application reset process. Default is true; if set to false, the application reset process is not executed.

Related Types

INoaApplicationResetCallbacks

The overridable methods and properties of NoaApplicationResetCallbacks 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 NoaApplicationResetCallbacks class.

Sample Code

#if NOA_DEBUGGER
using NoaDebugger;
using UnityEngine;

// Example of executing events after NOA Debugger’s application reset process.
public class ExampleApplicationResetter : NoaApplicationResetCallbacks
{
    public override void OnAfterApplicationReset()
    {
        // Output the scene name after the transition.
        Debug.Log($"Transitioned to: {SceneManager.GetActiveScene().name}");
    }
}

// Example of controlling whether to execute NOA Debugger’s application reset process with a custom flag.
public class ExampleOriginalApplicationResetter : NoaApplicationResetCallbacks
{
    bool isAllowBaseApplicationReset = true;
    public override bool IsAllowBaseApplicationReset => isAllowBaseApplicationReset;

    public override void OnBeforeApplicationReset()
    {
        // Example of branching processing based on the current scene state.
        switch (ExampleSceneManager.Instance.CurrentScene)
        {
            case SceneType.Boot:
            case SceneType.Splash:
                isAllowBaseApplicationReset = false;
                break;

            case SceneType.Title:
            case SceneType.Home:
                isAllowBaseApplicationReset = true;
                break;

            case SceneType.Battle:
                ExampleBattleManager.Instance.InterruptBattle();
                isAllowBaseApplicationReset = true;
                break;

            default:
                isAllowBaseApplicationReset = false;
                ExampleSceneManager.Instance.LoadScene(SceneType.Home);
                break;
        }
    }
}
#endif

Links

Related Features

  • Launching Tool

Classes Used

  • NoaController