Quit Application

Hi there…

I have been scratching my head for the last couple of day’s trying to figure out why my “Quit Application” script isn’t working on the Rocket Boost project. The script appears to be working as it returns results in the Debug.Log, but for some reason it doesn’t execute in the game, aka pressing escape doesn’t quit the game.

I am using Unity version 2021.1.26f1 on Windows 10

Does anyone have any suggestions how to fix this issue?

Kind Regards, Luke…

I’ve just noticed a typo lol, I’ll just go and check that out…

Nope, I am still having the same issue.

Does anyone have any suggestions.

Thank you…

Hi PhotiniDev,

Where exactly does Application.Quit not work? From the manual:

The Application.Quit call is ignored in the Editor.

1 Like

Hi Nina,

I added the script to the Player “RocketMan” and when I go into play mode, the esc button does not work, but it still returns the Debug.Log ok…

I have just come across another error since removing the script and re-applying the amended script which I think is directly related to the quit application script.

I suspect you missed the text that Nina posted:

“The Application.Quit call is ignored in the Editor.”

That means, that unless you build the app into say a windows application or an Android application, quit won’t quit while you’re running this in the editor (basically, inside Unity).

1 Like

To avoid any confusion: The Quit function also does not work in WebGL builds. Just in a standalone build or mobile app.

2 Likes

Didn’t know about WebGL builds, but that also makes sense.

1 Like

Ok, I understand now, thanks for the replies folks, it really is appreciated. Have a magnificent day :star_struck:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms