summaryrefslogtreecommitdiffstats
path: root/Scripts/Fold/Editor/FoldGraphView.cs
blob: 2a94b9fcf2946c0b0d06cb923003dbdf29e7ce8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using UnityEngine;
using UnityEditor;
using GraphProcessor;
using System;
using System.Collections.Generic;

public class FoldGraphView : BaseGraphView
{
    public FoldGraphView(EditorWindow window) : base(window) {}

    public override IEnumerable<(string path, Type type)> FilterCreateNodeMenuEntries()
    {
        // Only return our subset of nodes
        foreach (var nodeMenuItem in NodeProvider.GetNodeMenuEntries(graph))
        {
            if (typeof(BaseFoldNode).IsAssignableFrom(nodeMenuItem.type))
                yield return nodeMenuItem;
        }
    }
}