Exemplo n.º 1
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         GameObject.DontDestroyOnLoad(gameObject);
     }
 }
Exemplo n.º 2
0
 void Awake()
 {
     music = GameObject.FindObjectOfType <ToggleMusicBtn>();
     UpdateIcon();
 }