blob: 7a580bfe9734e9d421ec00e093cdde6df13660e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XNode.Examples;
namespace XNodeEditor.Examples {
[CustomNodeGraphEditor(typeof(MathGraph))]
public class MathGraphEditor : NodeGraphEditor {
/// <summary>
/// Overriding GetNodeMenuName lets you control if and how nodes are categorized.
/// In this example we are sorting out all node types that are not in the XNode.Examples namespace.
/// </summary>
public override string GetNodeMenuName(System.Type type) {
if (type.Namespace == "XNode.Examples.MathNodes") {
return base.GetNodeMenuName(type).Replace("X Node/Examples/Math Nodes/", "");
} else return null;
}
}
}
|