diff --git a/Scripts/Editor/NodeEditor.cs b/Scripts/Editor/NodeEditor.cs index 2de8c02..fa4e110 100644 --- a/Scripts/Editor/NodeEditor.cs +++ b/Scripts/Editor/NodeEditor.cs @@ -87,7 +87,6 @@ namespace XNodeEditor { private Type inspectedType; /// Tells a NodeEditor which Node type it is an editor for /// Type that this editor can edit - /// Path to the node public CustomNodeEditorAttribute(Type inspectedType) { this.inspectedType = inspectedType; } diff --git a/Scripts/Editor/NodeEditorBase.cs b/Scripts/Editor/NodeEditorBase.cs index 2a16f18..b94f290 100644 --- a/Scripts/Editor/NodeEditorBase.cs +++ b/Scripts/Editor/NodeEditorBase.cs @@ -7,7 +7,10 @@ using UnityEngine; namespace XNodeEditor.Internal { /// Handles caching of custom editor classes and their target types. Accessible with GetEditor(Type type) - public class NodeEditorBase where A : Attribute, NodeEditorBase.INodeEditorAttrib where T : NodeEditorBase where K : ScriptableObject { + /// Editor Type. Should be the type of the deriving script itself (eg. NodeEditor) + /// Attribute Type. The attribute used to connect with the runtime type (eg. CustomNodeEditorAttribute) + /// Runtime Type. The ScriptableObject this can be an editor for (eg. Node) + public abstract class NodeEditorBase where A : Attribute, NodeEditorBase.INodeEditorAttrib where T : NodeEditorBase where K : ScriptableObject { /// Custom editors defined with [CustomNodeEditor] private static Dictionary editorTypes; private static Dictionary editors = new Dictionary(); diff --git a/Scripts/Editor/NodeEditorGUILayout.cs b/Scripts/Editor/NodeEditorGUILayout.cs index 7ee43a6..bcc142b 100644 --- a/Scripts/Editor/NodeEditorGUILayout.cs +++ b/Scripts/Editor/NodeEditorGUILayout.cs @@ -335,7 +335,6 @@ namespace XNodeEditor { // Move array data if there is any if (hasArrayData) { - SerializedProperty arrayDataOriginal = arrayData.Copy(); arrayData.MoveArrayElement(reorderableListIndex, rl.index); } diff --git a/Scripts/Editor/NodeEditorReflection.cs b/Scripts/Editor/NodeEditorReflection.cs index 171f3b3..5601951 100644 --- a/Scripts/Editor/NodeEditorReflection.cs +++ b/Scripts/Editor/NodeEditorReflection.cs @@ -71,16 +71,6 @@ namespace XNodeEditor { return types.ToArray(); } - public static object ObjectFromType(Type type) { - return Activator.CreateInstance(type); - } - - public static object ObjectFromFieldName(object obj, string fieldName) { - Type type = obj.GetType(); - FieldInfo fieldInfo = type.GetField(fieldName); - return fieldInfo.GetValue(obj); - } - public static KeyValuePair[] GetContextMenuMethods(object obj) { Type type = obj.GetType(); MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); diff --git a/Scripts/Editor/NodeGraphEditor.cs b/Scripts/Editor/NodeGraphEditor.cs index bcb95e1..1c32a6e 100644 --- a/Scripts/Editor/NodeGraphEditor.cs +++ b/Scripts/Editor/NodeGraphEditor.cs @@ -65,7 +65,7 @@ namespace XNodeEditor { public string editorPrefsKey; /// Tells a NodeGraphEditor which Graph type it is an editor for /// Type that this editor can edit - /// Define unique key for unique layout settings instance + /// Define unique key for unique layout settings instance public CustomNodeGraphEditorAttribute(Type inspectedType, string editorPrefsKey = "xNode.Settings") { this.inspectedType = inspectedType; this.editorPrefsKey = editorPrefsKey;