I have some actions need to perform when the application is closed, like clearing some cached player preferences. No matter which scenes the user is, it should be executing.
Should I put it in a DontDestroyOnLoad object? or OnApplicationQuit is an event register that those code would run well even across the scenes?
Thank you.
↧