'Application.Quit() does not seem to close the app on Hololens 2

I have a unity app with HandMenu in the first scene. One of the buttons in this Menu is to kill/close the app.

I have made a script that has the following method and attached it to the button's Interactbale component's onClick() events.

public void EndApplication(){ Application.Quit(); }

It seems to be not working on Hololens 2.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source