diff --git a/Scripts/Editor/NodeEditorBase.cs b/Scripts/Editor/NodeEditorBase.cs index 0868ce0..14ef5ce 100644 --- a/Scripts/Editor/NodeEditorBase.cs +++ b/Scripts/Editor/NodeEditorBase.cs @@ -10,7 +10,6 @@ namespace XNodeEditor.Internal { public class NodeEditorBase where A : Attribute, NodeEditorBase.INodeEditorAttrib where T : NodeEditorBase where K : ScriptableObject { /// Custom editors defined with [CustomNodeEditor] private static Dictionary editors; - private static Dictionary serializeds; public K target; public SerializedObject serializedObject; @@ -19,17 +18,10 @@ namespace XNodeEditor.Internal { Type type = target.GetType(); T editor = GetEditor(type); editor.target = target; - editor.serializedObject = GetSerialized(target); + editor.serializedObject = new SerializedObject(target); return editor; } - private static SerializedObject GetSerialized(K target) { - if (target == null) return null; - if (serializeds == null) serializeds = new Dictionary(); - if (!serializeds.ContainsKey(target)) serializeds.Add(target, new SerializedObject(target)); - return serializeds[target]; - } - private static T GetEditor(Type type) { if (type == null) return null; if (editors == null) CacheCustomEditors();