protected override Transform getPoint() { pointList.Clear(); foreach (Transform c in points) { if (c.childCount > 0) { continue; } if (c.gameObject.activeSelf == false) { continue; } pointList.Add(c); } if (pointList.Count == 0) { return(null); } if (pointList.Count == 1) { return(pointList[0]); } return(RandomEx.weightedChoice(pointList, (x) => 1)); }