What is temp data?

It will be just as hard for me to describe my problem as it might be for you to help me :stuck_out_tongue:
I have a save Load script that saves works - but I don’t know how - and a glitch appears when you go back to Main Menu via the pause menu during a session. So I wonder what is being “saved” during a session?

This is the problem:

Senario 1:
I play the game and pick something up from the floor (I use playerprefs) and turn off the game.
I turn the game back on and load the game but the thing I picked up is still on the floor. (Since I didn’t save… This works!)

Senario 2:
I play the and game pick something up from the floor - I return to the Main Menu via the Pause Menu.
I load my pervious game. The thing I picked up is no longer there… This is bad… Why is that?

How can I “Reset” data when going back to Main menu via my Pause Menu?
(I know its hard to help since I dont provide any scripts. But I thought maybe there is a “standard” solution to this)

This completely depends on exactly how you’re saving your data. You should show the code that runs when the thing is picked up off the floor, at the very least.

Anyway, the way you describe it sounds like you’re storing some state inside of static variables, such that they maintain that state until you exit the game. But again, let’s see how you’re keeping track of the fact that the item was picked up.

Did you not write this code, by the way? You mentioned that your Save/Load script works, but you don’t know how it works?

4 Likes