Handling quit requests

    Handling the notification

    On desktop platforms, the has a special notification that is sent to all nodes when quitting is requested.

    On Android, is sent instead. Pressing the Back button will exit the application if Application > Config > Quit On Go Back is checked in the Project Settings (which is the default).

    Note

    Handling the notification is done as follows (on any node):

    GDScript

    C#

    It is important to note that by default, Godot apps have the built-in behavior to quit when quit is requested, this can be changed:

    GDScript

    C#