UnityEditor.MemoryTreeList.RestoreViewState C# (CSharp) Méthode

RestoreViewState() private méthode

private RestoreViewState ( MemoryElement oldRoot, MemoryElement newRoot ) : void
oldRoot MemoryElement
newRoot MemoryElement
Résultat void
        private void RestoreViewState(MemoryElement oldRoot, MemoryElement newRoot)
        {
            foreach (MemoryElement element in newRoot.children)
            {
                element.ExpandChildren();
                if (element.ChildCount() != 0)
                {
                    MemoryElement outChild = null;
                    if (this.FindNamedChild(element.name, oldRoot.children, out outChild))
                    {
                        element.expanded = outChild.expanded;
                        if (element.expanded)
                        {
                            this.RestoreViewState(outChild, element);
                        }
                    }
                }
            }
        }