Save ScriptableObject On Unity Application Quit?

Hi, I have a editor window that stores some scriptableObject, I was able to serize them and store them when i close editor window (OnDestroy), but it wont receive this message when I close whole unity editor, which means i need to manully save them before i close unity. So is there a way to detect the closing of unity editor? so i can save them automatically.

MonoBehaviour.OnApplicationQuit()