blob: 7b592cddf045430599f23a15e8f0c4242bc3f07f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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;
}
}
}
|