void OnDestroy() { if (Application.isPlaying) { if (_ui != null) { _ui.Dispose(); _ui = null; } container.Dispose(); container = null; } else { EMRenderSupport.Remove(this); } DestroyTexture(); }