Dump a TreeNode object that binds to this renderer.
Inheritance: Script
        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);
        }
Example #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);
        }