I need to save the score when the scene resets

I see this question enough that I decided to answer it once and for all and you can tell me if I have done so successfully! Here is what I have created, two files:

ULTRA-simple static solution to a GameManager:

https://gist.github.com/kurtdekker/50faa0d78cd978375b2fe465d55b282b

Each file has notes at the top of it telling you how to use it. Can you please look it over and see if it makes sense? You will need to call GM.InitGame() at the start of every game, and call GM.AddScore() to add points, and then put the GMShowScore on whatever Text object you want to display your score.

EDIT: see attached full scene using the above:

7488068–921710–StaticGameManager.unitypackage (5.78 KB)

2 Likes