Script running in the background
I want to add a script that loads the highscore etc. from playerprefs at startup, and saves the highscore etc to the playerprefs when the application is closed. Besides that i would like other script to acces and edit these values. How should i do this?
Comment
Answer by tperry1x · Nov 20, 2015 at 03:53 PM
Perhaps use something like
function OnApplicationQuit () {
// put your script here to save the file when scene closed or application closed
}
Your answer
![](https://koobas.hobune.stream/wayback/20220612045756im_/https://answers.unity.com/themes/thub/images/avi.jpg)