public static GameObject PlaceTowerInSlotGO(TowerItemLegacy tower, GameObject towerSlotParent) { GameObject newGO = GameObject.Instantiate(tower.TowerPrefab, towerSlotParent.transform.position, Quaternion.identity, towerSlotParent.transform); newGO.name = (tower.TowerPrefab.name + UnityEngine.Random.Range(10000, 99999).ToString()); return(newGO); }
public static void PlaceTowerInSlot(TowerItemLegacy tower, GameObject TargetSlotObject, GameObject towerSlotParent) { TargetSlotObject = Instantiate(tower.TowerPrefab, towerSlotParent.transform.position, Quaternion.identity, towerSlotParent.transform); TargetSlotObject.name = (tower.TowerPrefab.name + UnityEngine.Random.Range(10000, 99999).ToString()); }