Пример #1
0
        public static void SaveSplitViewAndChildren(View splitview, EditorWindow win, string path)
        {
            ArrayList arrayList = new ArrayList();

            WindowLayout.AddSplitViewAndChildrenRecurse(splitview, arrayList);
            arrayList.Remove(splitview);
            arrayList.Remove(win);
            arrayList.Insert(0, splitview);
            arrayList.Insert(1, win);
            InternalEditorUtility.SaveToSerializedFileAndForget(arrayList.ToArray(typeof(UnityEngine.Object)) as UnityEngine.Object[], path, false);
        }
Пример #2
0
        public static void AddSplitViewAndChildrenRecurse(View splitview, ArrayList list)
        {
            list.Add((object)splitview);
            DockArea dockArea = splitview as DockArea;

            if ((UnityEngine.Object)dockArea != (UnityEngine.Object)null)
            {
                list.AddRange((ICollection)dockArea.m_Panes);
            }
            if ((UnityEngine.Object)(splitview as DockArea) != (UnityEngine.Object)null)
            {
                list.Add((object)dockArea.actualView);
            }
            foreach (View child in splitview.children)
            {
                WindowLayout.AddSplitViewAndChildrenRecurse(child, list);
            }
        }
Пример #3
0
        public static void AddSplitViewAndChildrenRecurse(View splitview, ArrayList list)
        {
            list.Add(splitview);
            DockArea dockArea = splitview as DockArea;

            if (dockArea != null)
            {
                list.AddRange(dockArea.m_Panes);
            }
            HostView x = splitview as DockArea;

            if (x != null)
            {
                list.Add(dockArea.actualView);
            }
            View[] children = splitview.children;
            for (int i = 0; i < children.Length; i++)
            {
                View splitview2 = children[i];
                WindowLayout.AddSplitViewAndChildrenRecurse(splitview2, list);
            }
        }