GameManager Unity сбрасывается после перезагрузки сцены
You need to add DontDestroyOnLoad(gameObject); in Awake. Every time the scene loads it makes a new copy of the GameManager and resets the value making the new GameManager equal the static Instance.
void Awake()
{
if (!Instance)
{
Instance = this;
DontDestroyOnLoad(gameObject);
}
else
{
//Duplicate GameManager created every time the scene is loaded
Destroy(gameObject);
}
}
bacon butty