Dynamic Header ScriptingDark Center BandCode
Manual

Back Button

Code examples to perform various interactions with the Back Button

Execute

Fire the ‘Back’ button event (if it can be executed and is enabled)

using Doozy.Engine.UI.Input;
using UnityEngine;

public class ExampleClass : MonoBehaviour
{
    private void Start()
    {
        BackButton.Instance.Execute();
    }
}

Disable

Disable the ‘Back’ button functionality

using Doozy.Engine.UI.Input;
using UnityEngine;

public class ExampleClass : MonoBehaviour
{
    private void Start()
    {
        BackButton.Disable();
    }
}

Enable

Enable the ‘Back’ button functionality

using Doozy.Engine.UI.Input;
using UnityEngine;

public class ExampleClass : MonoBehaviour
{
    private void Start()
    {
        BackButton.Enable();
    }
}

Enable By Force

Enable the ‘Back’ button functionality by resetting the additive bool to zero. backButtonDisableLevel = 0.
Use this ONLY for special cases when something wrong happens and the back button is stuck in disabled mode.

using Doozy.Engine.UI.Input;
using UnityEngine;

public class ExampleClass : MonoBehaviour
{
    private void Start()
    {
        BackButton.EnableByForce();
    }
}

Init

Initialize the BackButton Instance

using Doozy.Engine.UI.Input;
using UnityEngine;

public class ExampleClass : MonoBehaviour
{
    private void Start()
    {
        BackButton.Init();
    }
}