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