I wish to execute some code (spill inventory) when a player crashes from a server. I tried doing it in the OnLogout() function of the game mode but this only worked for normal disconnections and not crashes.
What function do I need to handle crashing from the server?
You can’t reliably know on the server if the client crashes. It would have to tell the server, from the exception handler or otherwise, that it crashed. But at that point the connection state could already be corrupted.