Example #1
0
    protected void OnHierarchyChange()
    {
        Transform[] transforms = Helper.GetObjectsOfType <Transform>();

        List <GameObject> expanded = new List <GameObject>();

        root.FillExpanded(expanded);

        root = new Entry();

        foreach (Transform t in transforms)
        {
            if (t.parent == null)
            {
                root.AddChild(t.gameObject);
            }
        }

        foreach (GameObject go in expanded)
        {
            root.Expand(go);
        }

        root.FindAndTagSelected(Selection.activeGameObject);

        root.Sort();

        Repaint();
    }
    protected void OnHierarchyChange()
    {
        Transform[] transforms = Helper.GetObjectsOfType<Transform>();

        List<GameObject> expanded = new List<GameObject>();

        root.FillExpanded(expanded);

        root = new Entry();

        foreach (Transform t in transforms)
        {
            if (t.parent == null)
                root.AddChild(t.gameObject);
        }

        foreach (GameObject go in expanded)
            root.Expand(go);

        root.FindAndTagSelected(Selection.activeGameObject);

        root.Sort();

        Repaint();
    }