private void SpawnEnemy() { GameObject go = Instantiate(m_Enemies[Random.Range(0, m_Enemies.Count)], m_SpawnPoint.transform.position, Quaternion.identity); GenericUnit unit = go.GetComponent <GenericUnit>(); go.transform.parent = GameObject.Find("_Units").transform; unit.Initialize(Team.Team2, unit.GetUnitData()); }
// Use this for initialization void Start() { m_MaxHealth = m_Unit.GetUnitData().Health; }