mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 09:16:01 +08:00
Merge pull request #4 from neko1990/master
compatibility patches, make xNode work on Unity 5.4.
This commit is contained in:
commit
a3312532db
@ -55,7 +55,7 @@ namespace XNodeEditor {
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class CustomNodeEditorAttribute : Attribute,
|
||||
INodeEditorAttrib {
|
||||
XNodeInternal.NodeEditorBase<NodeEditor, NodeEditor.CustomNodeEditorAttribute, XNode.Node>.INodeEditorAttrib {
|
||||
private Type inspectedType;
|
||||
/// <summary> Tells a NodeEditor which Node type it is an editor for </summary>
|
||||
/// <param name="inspectedType">Type that this editor can edit</param>
|
||||
|
||||
@ -72,8 +72,10 @@ namespace XNodeEditor {
|
||||
kvp.Add(new KeyValuePair<ContextMenu, MethodInfo>(attribs[k], methods[i]));
|
||||
}
|
||||
}
|
||||
#if UNITY_5_5_OR_NEWER
|
||||
//Sort menu items
|
||||
kvp.Sort((x, y) => x.Key.priority.CompareTo(y.Key.priority));
|
||||
#endif
|
||||
return kvp.ToArray();
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ namespace XNodeEditor {
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class CustomNodeGraphEditorAttribute : Attribute,
|
||||
INodeEditorAttrib {
|
||||
XNodeInternal.NodeEditorBase<NodeGraphEditor, NodeGraphEditor.CustomNodeGraphEditorAttribute, XNode.NodeGraph>.INodeEditorAttrib {
|
||||
private Type inspectedType;
|
||||
/// <summary> Tells a NodeEditor which Node type it is an editor for </summary>
|
||||
/// <param name="inspectedType">Type that this editor can edit</param>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user