How to exit the game in Unity with confirmation dialog

Description

This solution consists of a scene with two buttons, one with the text “Play” and the other with “Exit”, the first button does nothing, the second one displays a confirmation dialog that asks us if we are sure we want to exit and has two buttons, the NO button and the YES button, the first one closes the confirmation dialog and we return to the menu, the second one closes the application or game in Unity.

Download Unity Package

You can download the Unity Package to import it in your own project.

In the following video I explain how to exit the game in Unity with confirmation dialog




Scroll to Top
Secured By miniOrange