'Persistent Data in Text between scenes

I’am facing somewhat of a problem here. So, I’m working on a clicker game with Unity and Visual Studio with C# I have headers with like coins and coins/s and at the bottom I have buttons to switch scenes like from main game to laboratory for example. In the lab (in another scene) I have that same GameManager and same canvas with the headers.

But when I switch scenes, the coins and coins/s are displayed as 0. The strange thing is, when in play mode, I click on the Inspector GameManager of the lab I can see my coins and coins/s having a value but in the canvas it stays at 0 😞



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source