Exemplo n.º 1
0
        public virtual HierarchyNodeTree CreateNodeTree(NodeComponent nodeComponent)
        {
            var tree = new HierarchyNodeTree(nodeComponent, -1);

            tree.icon = uNodeEditorUtility.GetTypeIcon(nodeComponent.GetNodeIcon()) as Texture2D;
            return(tree);
        }
Exemplo n.º 2
0
        public override HierarchyNodeTree CreateNodeTree(NodeComponent nodeComponent)
        {
            var target     = nodeComponent as Nodes.MacroPortNode;
            var parentNode = target.parentComponent as NodeComponent;

            if (parentNode != null)
            {
                var tree = new HierarchyNodeTree(nodeComponent, -1);
                tree.icon = uNodeEditorUtility.GetTypeIcon(nodeComponent.GetNodeIcon()) as Texture2D;
                if (target.kind == PortKind.FlowInput)
                {
                    tree.displayName = string.IsNullOrEmpty(tree.displayName) ? parentNode.GetNodeName() : $"{parentNode.GetNodeName()} ( {tree.displayName} )";
                }
                return(tree);
            }
            return(null);
        }