public GameObject CreateUnit(SpawnUnit unit, Quaternion rotation, Transform parent) { // create unit GameObject instance = unit.Create(position, rotation, parent); // check if empty if (unit.IsEmpty()) { units.Remove(unit); } // return instance return(instance); }
public SpawnUnit(SpawnUnit other) : this(other.prefab, other.amount) { }