public void UnRegister(AIPath unit) { if (unit == null || !units.Contains(unit)) { return; } units.Remove(unit); sim.removeAgent(); }