Skip to content

Commit

Permalink
Fixed a UIPanel edit mode bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
ytom committed Nov 28, 2016
1 parent 2841ed6 commit 0a82f02
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Source/Scripts/UI/UIPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 0a82f02

Please sign in to comment.