Пример #1
0
            private static void DestroyHierarchy(HierarchyNode parentNode)
            {
                Object.Destroy(parentNode.guiElement);

                foreach (HierarchyNode childNode in parentNode.nodeList)
                {
                    IAHierarchy.DestroyHierarchy(childNode);
                }
            }
Пример #2
0
 public static void Init(GameObject initObject = null)
 {
     if (initObject != null)
     {
         IAHierarchy.instance.selectedObject = initObject;
     }
     IAHierarchy.Objects.hierarchyTransform       = GameObject.Find("CVS_IAHierarchy").transform;
     IAHierarchy.Objects.viewportContentTransform = IAHierarchy.Objects.hierarchyTransform.Find("Scroll View/Viewport/Content");
     IAHierarchy.rootNode = IAHierarchy.GetRootNode();
     IAHierarchy.BuildHierarchy(IAHierarchy.rootNode);
     IAHierarchy.Rendering.RenderGUITree(IAHierarchy.rootNode);
     GameObject.Find("CVS_IAHierarchy").SetActive(false);
 }
Пример #3
0
            private static void BuildHierarchy(HierarchyNode parentNode, int i = 0)
            {
                GameObject gameObject = parentNode.gameObject;

                i++;

                foreach (Transform child in gameObject.transform)
                {
                    if (!child.name.Contains("HighlightModel"))
                    {
                        HierarchyNode childNode = new HierarchyNode(child.gameObject, i, parentNode);
                        parentNode.AddNode(childNode);
                        IAHierarchy.BuildHierarchy(childNode, i);
                    }
                }
            }
Пример #4
0
 void Start()
 {
     IAHierarchy.instance = this;
     IAHierarchy.Init();
 }