but the above is only called if you actually leave the application I don’t think it gets called if your application/game gets killed by the os (like in Android)
So if a person is using the application in Windows or Mac OSX, and they click the close button (in windows, the “X” in mac, the red “x” dot) this function will be called ?
Thanks for your response. I’m trying to handle the log out packet without having players still logged in until the server times out all players that have not sent a packet in the last 15 seconds or so.
I have been able to create my server timer to timeout players after a specific time frame if the player’s client had crashed. And using the OnApplicationQuit() I have ensured that when the client is closed, the logout packet is sent to the server instantly logging said player out.