diff --git a/Runtime/engine/UIWidgetsPanel.cs b/Runtime/engine/UIWidgetsPanel.cs index c886fea3..440c460f 100644 --- a/Runtime/engine/UIWidgetsPanel.cs +++ b/Runtime/engine/UIWidgetsPanel.cs @@ -192,6 +192,13 @@ public WindowPadding viewInsets { } protected override void OnDisable() { + + if (this._viewMetricsCallbackRegistered) { + this._viewMetricsCallbackRegistered = false; + UIWidgetsMessageManager.instance?.RemoveChannelMessageDelegate("ViewportMatricsChanged", + this._handleViewMetricsChanged); + } + D.assert(this._windowAdapter != null); this._windowAdapter.OnDisable(); this._windowAdapter = null; @@ -417,4 +424,4 @@ public Window window { get { return this._windowAdapter; } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 5fd9bb09..1d741393 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.uiwidgets", "displayName":"UIWidgets", - "version": "1.5.4-preview.1", + "version": "1.5.4-preview.2", "unity": "2018.4", "description": "UIWidgets allows you to build beautiful cross-platform apps through Unity", "dependencies": {