Exit Game Function?

I want to save the player progress when he exit the Game in Standalone version or left the Editor Preview Version…I know how save Variables in a Save game object…but I don’t find a function that fire a event when the game is closed

You’ll need to create your own Game Module (like a plug in) and then implement the ShutdownModule method. Follow the FDefaultGameModuleImpl to get started.

I’m not sure if you can implement a game module with blueprints.

I suggest you to use “Save Points” (like dead space save points) with triggers and store the save points to save game . Is a lot easy to do this in that way.

Nice ideia…another i had this morning is create a button on my pause menu…check for the latest save and save minor things like ammo…or life…

virtual void BeginDestroy() override;

void AMyGameMode::BeginDestroy()
{
	Super::BeginDestroy();
	
	...
	your logic code...
	...
}

I think this is the same question as Event on Close and call function before quit game.

the basic idea is you need to create a subclass of UEngine and override it’s PreExit function or create a subclass of UGameInstance and override its Shutdown function