private void SpawnUnit(GameObject prefab, int spawnLoc) { GameObject go = Instantiate(prefab, SpawnPoints[spawnLoc].transform.position, Quaternion.identity); go.transform.SetParent(Minions); Minion minion = go.GetComponent <Minion>(); //Minion Pathing minion.Path = InGameManager.MakePath(TeamID, spawnLoc); minion.Target = minion.Path[0].transform; }