Beispiel #1
0
 void Awake()
 {
     DontDestroyOnLoad(gameObject);
     if (GameObject.FindGameObjectsWithTag("UIManager").Length < 1)
     {
         gameObject.tag = "UIManager";
         dialogPool.Init(5, dialogPrefab.gameObject);
         main = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }