void initFooterTowerBuildDragonInfo() { FooterTowerBuildDragonInfo = PlayManager.Instantiate(Resources.Load <GameObject>("Prefab/Play/FooterTowerBuildDragonInfo")) as GameObject; FooterTowerBuildDragonInfo.transform.parent = PlayManager.Instance.towerInfoController.transform; FooterTowerBuildDragonInfo.transform.localScale = Vector3.one; FooterTowerBuildDragonInfo.name = "Dragon Info"; FooterTowerBuildDragonInfo.GetComponent <UIStretch>().container = PlayManager.Instance.towerInfoController.gameObject; foreach (Transform child in PlayManager.Instance.towerInfoController.transform) { if (child.name.Equals("Upgrade")) { FooterTowerBuildDragonInfo.GetComponent <UIAnchor>().container = child.gameObject; break; } } }