public void OnDestroy() { if (NavmeshCut.OnDestroyCallback != null) { NavmeshCut.OnDestroyCallback(this); } NavmeshCut.RemoveCut(this); }