コード例 #1
0
ファイル: Panel.cs プロジェクト: zzrx79/UnityDecompiled
        private bool ValidateSubTree(VisualElement root)
        {
            if (root.renderData.lastLayout != new Rect(root.cssNode.LayoutX, root.cssNode.LayoutY, root.cssNode.LayoutWidth, root.cssNode.LayoutHeight))
            {
                root.Dirty(ChangeType.Transform);
                root.renderData.lastLayout = new Rect(root.cssNode.LayoutX, root.cssNode.LayoutY, root.cssNode.LayoutWidth, root.cssNode.LayoutHeight);
            }
            bool flag = root.cssNode.HasNewLayout;

            if (flag)
            {
                VisualContainer visualContainer = root as VisualContainer;
                if (visualContainer != null)
                {
                    foreach (VisualElement current in visualContainer)
                    {
                        flag |= this.ValidateSubTree(current);
                    }
                }
            }
            root.OnPostLayout(flag);
            root.ClearDirty(ChangeType.Layout);
            root.cssNode.MarkLayoutSeen();
            return(flag);
        }