mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 01:36:03 +08:00
Changed GetNodePath to GetNodeMenuName as per master branch
This commit is contained in:
parent
e896ee23c1
commit
5f3ac8fa6e
@ -8,12 +8,12 @@ namespace XNodeEditor.Examples {
|
||||
public class MathGraphEditor : NodeGraphEditor {
|
||||
|
||||
/// <summary>
|
||||
/// Overriding GetNodePath lets you control if and how nodes are categorized.
|
||||
/// 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 GetNodePath(System.Type type) {
|
||||
public override string GetNodeMenuName(System.Type type) {
|
||||
if (type.Namespace == "XNode.Examples.MathNodes") {
|
||||
return base.GetNodePath(type).Replace("X Node/Examples/Math Nodes/", "");
|
||||
return base.GetNodeMenuName(type).Replace("X Node/Examples/Math Nodes/", "");
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,12 +9,12 @@ namespace XNodeEditor.Examples {
|
||||
public class StateGraphEditor : NodeGraphEditor {
|
||||
|
||||
/// <summary>
|
||||
/// Overriding GetNodePath lets you control if and how nodes are categorized.
|
||||
/// 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 GetNodePath(System.Type type) {
|
||||
public override string GetNodeMenuName(System.Type type) {
|
||||
if (type.Namespace == "XNode.Examples.StateGraph") {
|
||||
return base.GetNodePath(type).Replace("X Node/Examples/State Graph/", "");
|
||||
return base.GetNodeMenuName(type).Replace("X Node/Examples/State Graph/", "");
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user