private void NodeRecursiveAdd(NodeGraphBuilder builder, ISkillNode data)
        {
            if (data.Hide)
            {
                return;
            }

            if (data.IsGroup)
            {
                builder.AddGroup();
                data.GetSortedChildren().ForEach(child => NodeRecursiveAdd(builder, child));

                if (data.GroupEnd != null)
                {
                    builder.EndGroup(data.GroupEnd.DisplayName, data.GroupEnd.Graphic);
                    SetNodeDetails(builder, data.GroupEnd);
                    data.GroupEnd.GetSortedChildren().ForEach(child => NodeRecursiveAdd(builder, child));
                }

                builder.End();
            }
            else
            {
                builder.Add(data.DisplayName, data.Graphic);
                SetNodeDetails(builder, data);

                data.GetSortedChildren().ForEach(child => NodeRecursiveAdd(builder, child));
                builder.End();
            }
        }
        private void Start()
        {
            var graphBuilder = new NodeGraphBuilder();

            data.root.GetSortedChildren().ForEach(child => NodeRecursiveAdd(graphBuilder, child));

            _graph = graphBuilder.Build();
            printer.Build(_graph);

            UpdatePoints();
        }
 private void SetNodeDetails(NodeGraphBuilder builder, ISkillNode data)
 {
     builder.Description(data.Description)
     .NodeType(data.NodeType)
     .Purchased(data.IsPurchased)
     .IsPurchasable(() => IsPurchasable(data))
     .OnPurchase(() => { ChangePoints(data, -1); })
     .OnRefund(() => { ChangePoints(data, 1); })
     .IsLocked(() => currentLevel < data.RequiredLevel)
     .LockedDescription(() => $"Level {data.RequiredLevel} is required.")
     .OnClickNode((node) => context.Open(node));
 }