protected virtual void OnDestroy() { try { m_ocean.Deregister(this); } catch (Exception e) { Ocean.LogError(e.ToString()); WasError = true; enabled = false; } }