// Remove unitmarker of given unit and put it back in the pool private void RemoveUnitWaypointMarker(UnitWaypoint unitWaypoint) { UnitWaypointMarker unitMarker = unitWaypointMarkers[unitWaypoint]; unitMarker.Deactivate(); unitWaypointMarkers.Remove(unitWaypoint); unitWaypoints.Remove(unitWaypoint); unitWaypointMarkerPool.Add(unitMarker); }