Keep score when reloading scene.

Hey people, i need to know how to keep the score after i reload the scene. I can’t be using don’t destroy on load ,because of other parts of the game. Any help will be appreciated. Thank you :slight_smile:

Can’t use that, eh? Never heard of that :slight_smile: Sorry, anyways…

How many things, just 1 score? You can try PlayerPrefs or a static variable (in any class).
Cheers. :slight_smile:

It’s just one score. Can you please give me example with the static variable.

What do you mean give you an example?
In any script/class, declare a (score) variable as public static
then, when you want to look it up (on the next scene?) ClassName.VariableName is how you access it.
:slight_smile:

1 Like

Thank you!

:slight_smile: np

1 Like

How would you use it in a PlayerPrefs situation? Because when it counts my score and I load in a new scene, it deletes!