Is there a way to detect if a game window is closed via the X button instead of with escape or the back button on Android?
Do you wish to prevent it or just detect it?
The final() function of your scripts will be closed but I don’t think you’re guaranteed to have enough time to do anything significant like saving game state. Maybe, but not guaranteed.
Maybe DefOS has something?
DefOS does not help with this. I don’t remember atm if we tried / if we couldn’t mess with it without breaking other things in Defold.
Vote on this issue
2 Likes