void OnDestroy() { // Only destroy created hulls if this was created during Play mode if(!(Application.isEditor && Application.isPlaying == false)) DestroyHulls(); }