#Send a request in OnApplicationQuit
1 messages · Page 1 of 1 (latest)
Is there a way to "force" the request to be sent in a blocking way, or just wait for it to send before actually quiting ?
Most likely, your game process is quitting before the request can finish.
To get around this, you can either prevent quitting by hooking into Application.wantsToQuit and retuning false, or by starting a command line program from within OnApplicationQuit, which sends the request in stead of your game.
Note that likely neither of those ways will work if the game is quit through the task manager or the computer shutting down; so the request not reaching the server always remains a possibility.
oh well, i guess i'll just tweak BestHTTP to make the Request.Send not async