Score trans between scenes,Score trans between scenes
I have two scenes, all of which need a count of the amount of gold coins. I can now display the number of gold coins in scene one in scene two. However, in the second scene, I continue to collect gold coins but the score number no longer increase. Score number keep shows the number from scene one. How can I increase the number of gold coins in second scene? Just add on the number from scene one?
Comment
Answer by gjf · Sep 22, 2019 at 03:44 PM
You could either use a persistent game object between scenes (using DontDestroyOnLoad) to act as a score manager or save the score in PlayerPrefs between scenes, although the former is generally easier.