Save game state on Exit

Is there an event you can hook into that is called when unity is closing. For instance if you close a windows application by clicking the X in the corner an Event is fired where you can perform some function.

What we want to do is save the game state so that the player can’t just quit out after each action until things turn out favorably. The alternative is to save the game state after each action is completed but i’d rather avoid that if possible

Cheers

Cheers for that i’ll give it a try :smile: