Hello!
I want to save the game if the game lose the focus (because the player can close the app this way, and the values of all the variables would be lost!).
I use Easy Save for this.
My phone ignore “OnApplicationFocus”. What should i do to handle that? The scripting reference gives an example about it.
I tried using this:
OnApplicationFocus(bool focusStatus)
{
if (focusStatus == false)
{
ES2.Save(valueCounter, “SaveFile.txt?tag=valueCounter”);
}
}
My windows phone ignores it and still doesnt save it if i lose the focus (holding the back button to the overview and closing on X).
I also tried OnApplicationPause but he ignores it too.
Which way do you handle that problem?
Thank you for helping
Greetings