public void ConnectTo(Waypoint next) { if (m_next) { DestroyImmediate(m_next.gameObject); } if (next != null) { if (next.m_last != null) { DestroyImmediate(next.m_last.gameObject); } m_next = RoadUtility.CreatePath(this, next); next.m_last = m_next; } UpdateWaypointDirection(true); }
public void ConnectFrom(Waypoint last) { if (m_last) { DestroyImmediate(m_last.gameObject); } if (last != null) { if (last.m_next != null) { DestroyImmediate(last.m_next.gameObject); } m_last = RoadUtility.CreatePath(last, this); last.m_next = m_last; } UpdateWaypointDirection(true); }