Detecting when the webplayer is closed.

Hello all, i am currently implementing some metrics into my game and having them posted to a database. This all works fine when running in the editor and standalone modes but when I try to run it in the webplayer it seems as the built in OnDestroy function is never called. I was wondering if there is another way to tell when the window the player is in is closed so that I can post the data to my server.

Run this function: OnApplicationQuit ()

more info:

Tried that as well, it does not work.

Anyone else have some other way to detect when the browser is closed?

there is none. When the browser is closed the plugin is directly killed you get no “extended grace period to shut down” nor is there a standard for events etc upon browser termination towards plugins