diff --git a/Source/Scripts/UI/UIPanel.cs b/Source/Scripts/UI/UIPanel.cs index c0f50229..e91cbadb 100644 --- a/Source/Scripts/UI/UIPanel.cs +++ b/Source/Scripts/UI/UIPanel.cs @@ -377,6 +377,12 @@ void CreateUI_EditMode() void HandleScreenSizeChanged() { + if (!Application.isPlaying) + { + DisplayOptions.SetEditModeHideFlags(); + DisplayOptions.defaultRoot = this.transform; + } + screenSizeVer = StageCamera.screenSizeVer; if (this.container != null) @@ -556,14 +562,14 @@ public void EM_BeforeUpdate() public void EM_Update(UpdateContext context) { - DisplayOptions.SetEditModeHideFlags(); - DisplayOptions.defaultRoot = this.transform; + DisplayOptions.SetEditModeHideFlags(); + DisplayOptions.defaultRoot = this.transform; - container.Update(context); + container.Update(context); - DisplayOptions.defaultRoot = null; + DisplayOptions.defaultRoot = null; - if (setNativeChildrenOrder) + if (setNativeChildrenOrder) { CacheNativeChildrenRenderers();