Dump a TreeNode object that binds to this renderer.
상속: Script
예제 #1
0
        private TreeNode DumpTreeNode(SceneObject obj)
        {
            TreeNode           node   = null;
            DumpTreeNodeScript script = obj.GetScript <DumpTreeNodeScript>();

            if (script != null)
            {
                node = script.DumpTreeNode();
            }
            else
            {
                node     = new TreeNode(string.Format("{0}", obj.Name));
                node.Tag = obj;
            }

            // dump children nodes.
            foreach (var item in obj.Children)
            {
                TreeNode child = DumpTreeNode(item);
                if (child != null)
                {
                    node.Nodes.Add(child);
                }
            }

            return(node);
        }
예제 #2
0
        private TreeNode DumpTreeNode(SceneObject obj)
        {
            TreeNode           node   = null;
            DumpTreeNodeScript script = obj.GetScript <DumpTreeNodeScript>();

            if (script != null)
            {
                node = script.DumpTreeNode();
            }

            if (node != null)
            {
                foreach (var item in obj.Children)
                {
                    TreeNode child = DumpTreeNode(item);
                    if (child != null)
                    {
                        node.Nodes.Add(child);
                    }
                }
            }

            return(node);
        }