public static void RemoveTower(UnitTower tower) { instance.activeTowerList.Remove(tower); if (tower.IsSupport()) { instance.supportTowerList.Remove(tower); } UnitTower.RemoveTower(tower); //for limiting tower count in the scene according to prefabID int idx = instance.towerCounterPrefabID.IndexOf(tower.prefabID); if (idx >= 0) { instance.towerCounterList[idx] -= 1; } TDTK.OnNewTower(null); }