Is there an event that is called at the end of the game? Let’s say you want to automatically save some game state information when a dedicated server is starting to shutdown. What event could you use to accomplish this?
#Game Mode
Check in game mode class!
There’s several
#GameEnding()
You probably want this one ![]()
/** Engine is shutting down. */
virtual void PreExit() OVERRIDE;
//~~~
/** Called right before exiting or performing a server travel. */
virtual void GameEnding() OVERRIDE;
When in the editor PreExit() is only called when the editor is being closed and GameEnding() seems to never be called in the engine. I tried overloading both of them with no luck ![]()
In current UE4 version, you need to override GameInstance::Shutdown();
1 Like
Can you explain how? I have “method with override specifier ‘override’ did not override any base class methods” if i try.
virtual void Shutdown() override;