Esempio n. 1
0
 private void Awake()
 {
     if (Instance)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
 void Awake()
 {
     if (intance == null)
     {
         intance  = this;
         iconList = new List <GameObject> ();
     }
     else
     {
         Destroy(gameObject);
     }
 }