What happen when you press Home or Menu button while the game is Loading ?

Hello Guys !

I would like to know what happen when you launch the game, and directly press Menu or Home button of your android device, then go back to the game. I’m wondering it because when i do such thing, it seems that PlayerPrefs are not loaded for an unknown reason. So i see my scene but every objects that needed to load Playerprefs didnt work properly (they have default values instead of last saved values).

Here is how i handle PlayerPrefs : (i’m making a Tamagotchi-Like game)

I instantiate my prefab “Pet”.
i load PlayerPrefs related to my Pet.

Also:
I save PlayerPrefs when game Quit.
I save PlayerPrefs when game is Paused,
I load PlayerPrefs when game is Resumed

Thank you in advance for any help ! I Almost finished my game and can’t solve this issue :S

Ok so i found the solution :

when i press home or menu while game is loading, it makes the game Pause, so it saves my PlayerPrefs, BUT it was saving before loading the PlayerPrefs, that’s why i had the default values instead of last saved values.

To correct this : i created a boolean which i turn true after loading my playerprefs. and when the game is paused i check if the bool is true, otherwise i dont save → In otherwords, i Save PlayerPrefs on Pause only if PlayerPrefs are already loaded.