diff --git a/TNode/TNodeCore/Editor/Blackboard/IBlackboardView.cs b/TNode/TNodeCore/Editor/Blackboard/IBlackboardView.cs index 8da60e4..75f0586 100644 --- a/TNode/TNodeCore/Editor/Blackboard/IBlackboardView.cs +++ b/TNode/TNodeCore/Editor/Blackboard/IBlackboardView.cs @@ -2,16 +2,40 @@ using TNodeCore.Runtime.Models; using UnityEditor; -namespace TNodeCore.Editor.Blackboard{ +namespace TNode.TNodeCore.Editor.Blackboard{ + /// + /// View of the blackboard,different in each implementation,but the same in the interface. + /// public interface IBlackboardView{ + /// + /// Get the blackboard data model watched by this view. + /// + /// BlackboardData GetBlackboardData(); + /// + /// Set the blackboard data model watched by this view. + /// + /// void SetBlackboardData(BlackboardData data); + /// + /// Add a new entry for the blackboard.currently no such use. + /// + void AddItem(); - + /// + /// Setup the blackboard view from the given Editor and graphview + /// + /// + /// void Setup(IBaseDataGraphView graphView,EditorWindow ownerWindow); + + /// + /// Notify update the blackboard view's content by the watched blackboard data. + /// void NotifyUpdate(); } + //A generic implementation of the blackboard view. public interface IBlackboardView : IBlackboardView where T : BlackboardData{ T Data{ get; set; } diff --git a/TNode/TNodeCore/Editor/DeveloperHelper/CleanMissingTypeHelper.cs b/TNode/TNodeCore/Editor/DeveloperHelper/CleanMissingTypeHelper.cs index 49e886c..d00be4e 100644 --- a/TNode/TNodeCore/Editor/DeveloperHelper/CleanMissingTypeHelper.cs +++ b/TNode/TNodeCore/Editor/DeveloperHelper/CleanMissingTypeHelper.cs @@ -3,8 +3,12 @@ using UnityEditor; using UnityEngine; using UnityEngine.SceneManagement; -namespace TNodeCore.Editor.DeveloperHelper{ - public class CleanMissingTypeHelper +namespace TNode.TNodeCore.Editor.DeveloperHelper{ + /// + /// Helper options works on 2021.3 on newer unity versions only.call this in the early version may not work + /// + public static class CleanMissingTypeHelper + { [MenuItem("TNode/CleanMissingType/CleanScriptObjects")] public static void CleanMissingTypesOnScriptableObjects() @@ -18,15 +22,17 @@ namespace TNodeCore.Editor.DeveloperHelper{ Object obj = AssetDatabase.LoadMainAssetAtPath(path); if (obj != null) { - // if (SerializationUtility.ClearAllManagedReferencesWithMissingTypes(obj)) - // { - // - // report.Append("Cleared missing types from ").Append(path).AppendLine(); - // } - // else - // { - // report.Append("No missing types to clear on ").Append(path).AppendLine(); - // } + #if UNITY_2021_3_OR_NEWER + if (SerializationUtility.ClearAllManagedReferencesWithMissingTypes(obj)) + { + + report.Append("Cleared missing types from ").Append(path).AppendLine(); + } + else + { + report.Append("No missing types to clear on ").Append(path).AppendLine(); + } + #endif } } Debug.Log(report.ToString()); @@ -39,25 +45,28 @@ namespace TNodeCore.Editor.DeveloperHelper{ SceneManager.GetActiveScene().GetRootGameObjects(); foreach (GameObject root in SceneManager.GetActiveScene().GetRootGameObjects()){ foreach (var o in root.transform){ - // if (SerializationUtility.ClearAllManagedReferencesWithMissingTypes(o as Object)) - // { - // report.Append("Cleared missing types from ").Append(root.name).AppendLine(); - // } - // else - // { - // report.Append("No missing types to clear on ").Append(root.name).AppendLine(); - // } + #if UNITY_2021_3_OR_NEWER + if (SerializationUtility.ClearAllManagedReferencesWithMissingTypes(o as Object)) + { + report.Append("Cleared missing types from ").Append(root.name).AppendLine(); + } + else + { + report.Append("No missing types to clear on ").Append(root.name).AppendLine(); + } + #endif } - - // if (SerializationUtility.ClearAllManagedReferencesWithMissingTypes(root)) - // { - // report.Append("Cleared missing types from ").Append(root.name).AppendLine(); - // } - // else - // { - // report.Append("No missing types to clear on ").Append(root.name).AppendLine(); - // } +#if UNITY_2021_3_OR_NEWER + if (SerializationUtility.ClearAllManagedReferencesWithMissingTypes(root)) + { + report.Append("Cleared missing types from ").Append(root.name).AppendLine(); + } + else + { + report.Append("No missing types to clear on ").Append(root.name).AppendLine(); + } +#endif } Debug.Log(report.ToString()); diff --git a/TNode/TNodeCore/Editor/EditorPersistence/GraphEditorData.cs b/TNode/TNodeCore/Editor/EditorPersistence/GraphEditorData.cs index 5f5f5ac..9282ea8 100644 --- a/TNode/TNodeCore/Editor/EditorPersistence/GraphEditorData.cs +++ b/TNode/TNodeCore/Editor/EditorPersistence/GraphEditorData.cs @@ -1,22 +1,39 @@ using System; using System.Collections.Generic; +using TNodeCore.Editor.EditorPersistence; using TNodeCore.Editor.NodeGraphView; using TNodeCore.Runtime.Models; using UnityEngine; using UnityEngine.Serialization; -namespace TNodeCore.Editor.EditorPersistence{ - +namespace TNode.TNodeCore.Editor.EditorPersistence{ + /// + /// Graph Editor Data hold the config of a type of graph. + /// it's used by a graph editor to determine which implementation to use and some other config may be stored in here some days later. + /// [CreateAssetMenu(fileName = "Graph Editor Data", menuName = "TNode/Graph Editor Data")] public class GraphEditorData:ScriptableObject{ - [HideInInspector] - public List graphElementsData; - + /// + /// The implementation of a graph view.experimental graphview or GTF. + /// public GraphImplType graphImplType = GraphImplType.GraphViewImpl; + /// + /// Cached global static function to create a graph view by the given type of the graph data.it's injected by the implementation side. + /// public static Func GraphViewImplCreator; public static Func GtfImplCreator; + + /// + /// set this to true to maintain the graph in auto update mode,an auto update mode only applies certain types of graph. + /// TODO: move to graph data side later. + /// [FormerlySerializedAs("testMode")] public bool autoUpdate; - + /// + /// Get the implementation of a graphview by the given type of the graph. + /// + /// The type of the graph you want to create a view to inspect it + /// the corresponding graph view for the given graph data + /// public IDataGraphView GetGraphView () where T:GraphData{ switch (graphImplType){ case GraphImplType.GraphViewImpl:{ @@ -31,7 +48,9 @@ namespace TNodeCore.Editor.EditorPersistence{ } } - + /// + /// The possible implementation of a graph view by default. + /// public enum GraphImplType{ GraphViewImpl, GraphToolsFoundationImpl diff --git a/TNode/TNodeCore/Editor/EditorPersistence/GraphElementEditorData.cs b/TNode/TNodeCore/Editor/EditorPersistence/GraphElementEditorData.cs deleted file mode 100644 index fb3e9e9..0000000 --- a/TNode/TNodeCore/Editor/EditorPersistence/GraphElementEditorData.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using UnityEngine; - -namespace TNodeCore.Editor.EditorPersistence{ - [Serializable] - - public class GraphElementEditorData{ - public string guid; - public Rect pos; - } -} \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/EditorPersistence/GraphElementEditorData.cs.meta b/TNode/TNodeCore/Editor/EditorPersistence/GraphElementEditorData.cs.meta deleted file mode 100644 index f988729..0000000 --- a/TNode/TNodeCore/Editor/EditorPersistence/GraphElementEditorData.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: cde084f079a7426daa86ed86cb80ed1b -timeCreated: 1655969362 \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/EditorPersistence/IGraphViewPersistence.cs b/TNode/TNodeCore/Editor/EditorPersistence/IGraphViewPersistence.cs deleted file mode 100644 index 672b2ed..0000000 --- a/TNode/TNodeCore/Editor/EditorPersistence/IGraphViewPersistence.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TNodeCore.Editor.EditorPersistence{ - public interface IGraphViewPersistence{ - string GetPersistenceId(); - void ResetPos(GraphEditorData editorData); - void SavePos(GraphEditorData editorData); - - void OnRemoveFromGraph(GraphEditorData editorData); - } -} \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/EditorPersistence/IGraphViewPersistence.cs.meta b/TNode/TNodeCore/Editor/EditorPersistence/IGraphViewPersistence.cs.meta deleted file mode 100644 index d98a0b5..0000000 --- a/TNode/TNodeCore/Editor/EditorPersistence/IGraphViewPersistence.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 98a1e33328e84b9fa71241f2a1ce42a1 -timeCreated: 1656924679 \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/GraphEditor.cs b/TNode/TNodeCore/Editor/GraphEditor.cs index b4c339b..e5b913e 100644 --- a/TNode/TNodeCore/Editor/GraphEditor.cs +++ b/TNode/TNodeCore/Editor/GraphEditor.cs @@ -1,3 +1,4 @@ +using TNode.TNodeCore.Editor.EditorPersistence; using TNodeCore.Editor.EditorPersistence; using TNodeCore.Editor.NodeGraphView; using TNodeCore.Runtime.Models; diff --git a/TNode/TNodeCore/Editor/Inspector.meta b/TNode/TNodeCore/Editor/Inspector.meta deleted file mode 100644 index 8303405..0000000 --- a/TNode/TNodeCore/Editor/Inspector.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 71a4cdef7fcc4595bbca70ca16e06e9d -timeCreated: 1656126162 \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Inspector/INodeDataBinding.cs b/TNode/TNodeCore/Editor/Inspector/INodeDataBinding.cs deleted file mode 100644 index a502fb5..0000000 --- a/TNode/TNodeCore/Editor/Inspector/INodeDataBinding.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace TNodeCore.Editor.Inspector{ - public interface INodeDataBinding:INodeDataBindingBase{ - - - - void OnBindingDataUpdate(); - } -} \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Inspector/INodeDataBinding.cs.meta b/TNode/TNodeCore/Editor/Inspector/INodeDataBinding.cs.meta deleted file mode 100644 index c218483..0000000 --- a/TNode/TNodeCore/Editor/Inspector/INodeDataBinding.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b06ba4ccd201400cbabfa7b6ee092cb2 -timeCreated: 1656137782 \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Inspector/INodeDataBindingBase.cs b/TNode/TNodeCore/Editor/Inspector/INodeDataBindingBase.cs deleted file mode 100644 index 1b2367e..0000000 --- a/TNode/TNodeCore/Editor/Inspector/INodeDataBindingBase.cs +++ /dev/null @@ -1,8 +0,0 @@ -using TNodeCore.Runtime.Models; - -namespace TNodeCore.Editor.Inspector{ - public interface INodeDataBindingBase{ - string BindingPath{ get; set; } - public NodeData BindingNodeData{ get; set; } - } -} \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Inspector/INodeDataBindingBase.cs.meta b/TNode/TNodeCore/Editor/Inspector/INodeDataBindingBase.cs.meta deleted file mode 100644 index 7885931..0000000 --- a/TNode/TNodeCore/Editor/Inspector/INodeDataBindingBase.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 2445523267fc49d3a17639a5c3ee47c7 -timeCreated: 1656210915 \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Models/EditorModel.cs b/TNode/TNodeCore/Editor/Models/EditorModel.cs index 4923434..0c116fa 100644 --- a/TNode/TNodeCore/Editor/Models/EditorModel.cs +++ b/TNode/TNodeCore/Editor/Models/EditorModel.cs @@ -1,9 +1,10 @@ using System; using TNodeCore.Runtime.Models; -using UnityEngine; -namespace TNodeCore.Editor.Models{ - //This models are editor only +namespace TNode.TNodeCore.Editor.Models{ + /// + /// Editor model that holds the editor only model. + /// [Serializable] public abstract class EditorModel:Model{ diff --git a/TNode/TNodeCore/Editor/Models/GraphViewData.cs b/TNode/TNodeCore/Editor/Models/GraphViewData.cs deleted file mode 100644 index d631d45..0000000 --- a/TNode/TNodeCore/Editor/Models/GraphViewData.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using TNodeCore.Editor.Models; -using UnityEngine; -using UnityEngine.Serialization; - -namespace TNode.TNodeCore.Editor.Models{ - [Serializable] - public class GraphViewData:EditorModel{ - public float persistScale = 1f; - public Vector2 persistOffset = Vector2.zero; - public bool isBlackboardOn; - } -} \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Models/GraphViewModel.cs b/TNode/TNodeCore/Editor/Models/GraphViewModel.cs new file mode 100644 index 0000000..4b4ed3b --- /dev/null +++ b/TNode/TNodeCore/Editor/Models/GraphViewModel.cs @@ -0,0 +1,25 @@ +using System; +using UnityEngine; +using UnityEngine.Serialization; + +namespace TNode.TNodeCore.Editor.Models{ + /// + /// It's called the graphview - model .not the ViewModel concept in MVVM. + /// Help graph view to persist its own data + /// + [Serializable] + public class GraphViewModel:EditorModel{ + /// + /// The scaling factor of a graph view. + /// + public float persistScale = 1f; + /// + /// The offset of a graph view in the canvas + /// + public Vector2 persistOffset = Vector2.zero; + /// + ///Is this graph view have a blackboard turn on. + /// + public bool isBlackboardOn; + } +} \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Models/GraphViewData.cs.meta b/TNode/TNodeCore/Editor/Models/GraphViewModel.cs.meta similarity index 100% rename from TNode/TNodeCore/Editor/Models/GraphViewData.cs.meta rename to TNode/TNodeCore/Editor/Models/GraphViewModel.cs.meta diff --git a/TNode/TNodeCore/Editor/Models/PlacematData.cs b/TNode/TNodeCore/Editor/Models/PlacematData.cs deleted file mode 100644 index 8ab8729..0000000 --- a/TNode/TNodeCore/Editor/Models/PlacematData.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using TNodeCore.Runtime.Models; -using UnityEngine; - -namespace TNodeCore.Editor.Models{ - [Serializable] - public class PlacematData:EditorModel{ - [SerializeReference] - public List hostModels = new List(); - - public int zOrder; - public string title; - } -} \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Models/PlacematModel.cs b/TNode/TNodeCore/Editor/Models/PlacematModel.cs new file mode 100644 index 0000000..3362023 --- /dev/null +++ b/TNode/TNodeCore/Editor/Models/PlacematModel.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using TNodeCore.Runtime.Models; +using UnityEngine; + +namespace TNode.TNodeCore.Editor.Models{ + /// + /// Placemats hold the nodes + /// + [Serializable] + public class PlacematModel:EditorModel{ + /// + /// In the experimental Graphview, no hostModels should be add.ignore it in most cases. + /// + [SerializeReference] + public List hostModels = new List(); + /// + /// zOrder of the placemat + /// + public int zOrder; + /// + /// title of the placemat + /// + public string title; + } +} \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Models/PlacematData.cs.meta b/TNode/TNodeCore/Editor/Models/PlacematModel.cs.meta similarity index 100% rename from TNode/TNodeCore/Editor/Models/PlacematData.cs.meta rename to TNode/TNodeCore/Editor/Models/PlacematModel.cs.meta diff --git a/TNode/TNodeCore/Editor/NodeGraphView/IBaseDataGraphView.cs b/TNode/TNodeCore/Editor/NodeGraphView/IBaseDataGraphView.cs index ee45cfc..d36cf64 100644 --- a/TNode/TNodeCore/Editor/NodeGraphView/IBaseDataGraphView.cs +++ b/TNode/TNodeCore/Editor/NodeGraphView/IBaseDataGraphView.cs @@ -5,21 +5,60 @@ using TNodeCore.Runtime.Models; using UnityEngine; namespace TNodeCore.Editor.NodeGraphView{ + /// + /// Base data graph view interface for all data graph views.its define the most behaviour of a data graph view. + /// public interface IBaseDataGraphView{ + /// + /// To add a node to the graph view + /// + /// The node data you want to add to graph view + /// The position you want to add in. In most situation, calculated by the implementation. + public void AddTNode(NodeData nodeData, Rect rect); + /// + /// Remove the node from the graph view.since Experimental graph view holds the reference itself.Currently no use of the this function + /// + /// public void RemoveTNode(NodeData nodeData); + /// + /// Add a link to the graphview + /// + /// public void AddLink(NodeLink nodeLink); + /// + /// Remove link from a graph view. + /// + /// public void RemoveLink(NodeLink nodeLink); + + /// + /// Is the graph view gives a auto update feature.St to true to call periodically the update function. + /// public bool AutoUpdate{ get; set; } + + /// + /// Create the blackboard view for the graph view. + /// public void CreateBlackboard(); + /// + /// Get the inspected graph data. + /// + /// public GraphData GetGraphData(); + /// + /// Get the inspected blackboard data.Differs in runtime graph and static graph. + /// + /// public BlackboardData GetBlackboardData(); - + /// + /// Check if it's used by a runtime graph. + /// public bool IsRuntimeGraph{ get; set; } /// @@ -27,11 +66,21 @@ namespace TNodeCore.Editor.NodeGraphView{ /// /// public RuntimeGraph GetRuntimeGraph(); + /// + /// Edit a graph data. + /// + /// The graph you want to edit,watch,update,modify public void SetGraphData(GraphData graph); - + /// + /// call after a runtime graph is finished its execution + /// public Action AfterGraphResolved{ get; set; } + + /// + /// call After the editor load this current graphview + /// void AfterEditorLoadGraphView(); //todo remove it later ,keep it now diff --git a/TNode/TNodeCore/Editor/NodeGraphView/IDataGraphView.cs b/TNode/TNodeCore/Editor/NodeGraphView/IDataGraphView.cs index fa3ee39..49f342a 100644 --- a/TNode/TNodeCore/Editor/NodeGraphView/IDataGraphView.cs +++ b/TNode/TNodeCore/Editor/NodeGraphView/IDataGraphView.cs @@ -1,10 +1,25 @@ -using TNodeCore.Editor.EditorPersistence; +using TNode.TNodeCore.Editor.EditorPersistence; +using TNodeCore.Editor.EditorPersistence; using TNodeCore.Runtime.Models; namespace TNodeCore.Editor.NodeGraphView{ + /// + /// A generic interface of the graph view.inherited from base data graph view.for a better operation only. + /// + /// public interface IDataGraphView : IBaseDataGraphView where T:GraphData{ + /// + /// The generalized data of a graph. + /// public T Data{ get; set; } + /// + /// Editor holds the graph view + /// GraphEditor Owner{ get; set; } + /// + /// Persist data into the graph editor data. + /// + /// void SaveWithEditorData(GraphEditorData graphEditorData); } } \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/PropertyDrawer/PropertyDrawer.cs b/TNode/TNodeCore/Editor/PropertyDrawer/PropertyDrawer.cs deleted file mode 100644 index 06274ac..0000000 --- a/TNode/TNodeCore/Editor/PropertyDrawer/PropertyDrawer.cs +++ /dev/null @@ -1,60 +0,0 @@ - -// namespace TNode.Editor{ -// [CustomPropertyDrawer(typeof(BlackboardData))] -// public class BlackboardDataPropertyDrawer:PropertyDrawer{ -// public float height = 0; -// public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) -// { -// // Using BeginProperty / EndProperty on the parent property means that -// // prefab override logic works on the entire property. -// var to = property.serializedObject.targetObject; -// -// if (to is RuntimeGraph runtimeGraph){ -// var blackboardData = property.boxedValue; -// var graphType = runtimeGraph.graphData.GetType(); -// -// Debug.Log(blackboardData); -// -// if (blackboardData == null || blackboardData.GetType()==typeof(BlackboardData)) -// { blackboardData= NodeEditorExtensions.GetAppropriateBlackboardData(graphType); -// property.boxedValue = blackboardData; -// -// } -// -// -// var posy = position.y; -// EditorGUI.BeginProperty(position, label, property); -// -// // Draw label -// EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label); -// height = EditorGUIUtility.singleLineHeight; -// -// // Don't make child fields be indented -// var indent = EditorGUI.indentLevel; -// EditorGUI.indentLevel = 0; -// -// //find the blackboard data -// -// var blackboardDataFields = blackboardData.GetType().GetFields(); -// posy += EditorGUIUtility.singleLineHeight; -// foreach (var blackboardDataField in blackboardDataFields){ -// var newPosition = new Rect(position.x, posy, position.width, EditorGUIUtility.singleLineHeight); -// EditorGUI.PropertyField(newPosition, property.FindPropertyRelative(blackboardDataField.Name), new GUIContent(blackboardDataField.Name)); -// posy += EditorGUIUtility.singleLineHeight; -// height+=EditorGUIUtility.singleLineHeight; -// } -// -// // Set indent back to what it was -// EditorGUI.indentLevel = indent; -// -// EditorGUI.EndProperty(); -// } -// -// -// } -// public override float GetPropertyHeight(SerializedProperty property, GUIContent label) -// { -// return base.GetPropertyHeight(property, label) + height; -// } -// } -// } \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/PropertyDrawer/PropertyDrawer.cs.meta b/TNode/TNodeCore/Editor/PropertyDrawer/PropertyDrawer.cs.meta deleted file mode 100644 index 45945d5..0000000 --- a/TNode/TNodeCore/Editor/PropertyDrawer/PropertyDrawer.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: e731c94a155641f39da7e1eb47f80f01 -timeCreated: 1657878003 \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Serialization/BlackboardDataWrapper.cs b/TNode/TNodeCore/Editor/Serialization/BlackboardDataWrapper.cs index 38a19c0..bcf02ee 100644 --- a/TNode/TNodeCore/Editor/Serialization/BlackboardDataWrapper.cs +++ b/TNode/TNodeCore/Editor/Serialization/BlackboardDataWrapper.cs @@ -1,7 +1,7 @@ using TNodeCore.Runtime; using TNodeCore.Runtime.Models; -namespace TNodeCore.Editor.Serialization{ +namespace TNode.TNodeCore.Editor.Serialization{ public class BlackboardDataWrapper:DataWrapper{ } } \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Serialization/NodeDataWrapper.cs b/TNode/TNodeCore/Editor/Serialization/NodeDataWrapper.cs index 07be82e..4d913fd 100644 --- a/TNode/TNodeCore/Editor/Serialization/NodeDataWrapper.cs +++ b/TNode/TNodeCore/Editor/Serialization/NodeDataWrapper.cs @@ -1,110 +1,8 @@ -using System; -using System.Collections.Generic; -using TNodeCore.Runtime; +using TNodeCore.Runtime; using TNodeCore.Runtime.Models; -using UnityEditor; -using UnityEngine; -namespace TNodeCore.Editor.Serialization{ - - - // public class NodeDataWrapper : ScriptableObject where T : NodeData{ - // public T Data; - // private static readonly Dictionary> Cache = new (); - // public event Action> OnValueChanged; - // public static NodeDataWrapper Get(T data){ - // if(Cache.ContainsKey(data)){ - // return Cache[data]; - // } - // var wrapper = ScriptableObject.CreateInstance>(); - // Cache.Add(data,wrapper); - // return wrapper; - // } - // public NodeDataWrapper(T data){ - // this.Data = data; - // } - // - // public void SetValue(string path, object value){ - // var fieldInfo = Data.GetType().GetField(path); - // fieldInfo.SetValue(Data,value); - // OnValueChanged?.Invoke(this); - // } - // - // public object GetValue(string path){ - // var fieldInfo = Data.GetType().GetField(path); - // return fieldInfo.GetValue(Data); - // } - // public static implicit operator T(NodeDataWrapper wrapper){ - // if (wrapper == null) - // return null; - // return wrapper.Data; - // - // } - // public static implicit operator NodeDataWrapper(T unWrapper){ - // if (unWrapper == null) - // return null; - // return Get(unWrapper); - // } - // } +namespace TNode.TNodeCore.Editor.Serialization{ public class NodeDataWrapper:DataWrapper{ } - /// - /// Scriptable object wrapper enable property drawer for t-node - /// instance create automatically when using get function,generic node data is not support yet because of unity serialization system. - /// TODO : support generic node data - /// - // public class NodeDataWrapper:ScriptableObject{ - // [SerializeReference] - // public NodeData data; - // private static readonly Dictionary Cache = new (); - // public event Action OnValueChanged; - // /// - // /// Create a new wrapper or get a infoCached wrapper for the given data - // /// - // /// node data,an implemented type is acceptable - // /// - // public static NodeDataWrapper Get(NodeData data){ - // if (data.GetType().IsGenericType){ - // return CreateInstance(); - // } - // if(Cache.ContainsKey(data)){ - // return Cache[data]; - // } - // var wrapper = CreateInstance(); - // wrapper.data = data; - // Cache.Add(data,wrapper); - // return wrapper; - // } - // - // - // public void SetValue(string path, object value){ - // var fieldInfo = data.GetType().GetField(path); - // fieldInfo.SetValue(data,value); - // OnValueChanged?.Invoke(this); - // } - // - // public object GetValue(string path){ - // var fieldInfo = data.GetType().GetField(path); - // return fieldInfo.GetValue(data); - // } - // public static implicit operator NodeData(NodeDataWrapper wrapper){ - // if (wrapper == null) - // return null; - // return wrapper.data; - // - // } - // /// - // /// Use this to get the wrapped data directly. - // /// - // /// - // /// - // public static implicit operator NodeDataWrapper(NodeData unWrapper){ - // if (unWrapper == null) - // return null; - // return Get(unWrapper); - // } - // } - - } \ No newline at end of file diff --git a/TNode/TNodeCore/Editor/Tools/GraphEditorCreator/GraphEditorCreator.cs b/TNode/TNodeCore/Editor/Tools/GraphEditorCreator/GraphEditorCreator.cs index 77dd57d..aadb174 100644 --- a/TNode/TNodeCore/Editor/Tools/GraphEditorCreator/GraphEditorCreator.cs +++ b/TNode/TNodeCore/Editor/Tools/GraphEditorCreator/GraphEditorCreator.cs @@ -1,5 +1,6 @@ using System.IO; using System.Text.RegularExpressions; +using TNode.TNodeCore.Editor.EditorPersistence; using TNodeCore.Editor.EditorPersistence; using UnityEditor; using UnityEngine; diff --git a/TNode/TNodeCore/Runtime/Models/GraphData.cs b/TNode/TNodeCore/Runtime/Models/GraphData.cs index 691712c..ef423e6 100644 --- a/TNode/TNodeCore/Runtime/Models/GraphData.cs +++ b/TNode/TNodeCore/Runtime/Models/GraphData.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using TNode.TNodeCore.Editor.Models; -using TNodeCore.Editor.Models; using UnityEditor; using UnityEngine; +using UnityEngine.Serialization; namespace TNodeCore.Runtime.Models{ [Serializable] @@ -47,8 +47,8 @@ namespace TNodeCore.Runtime.Models{ #if UNITY_EDITOR [SerializeReference] protected List editorModels ; - [SerializeReference] - protected GraphViewData graphViewData; + [FormerlySerializedAs("graphViewData")] [SerializeReference] + protected GraphViewModel graphViewModel; public List EditorModels{ @@ -58,12 +58,12 @@ namespace TNodeCore.Runtime.Models{ } set => editorModels = value; } - public GraphViewData GraphViewData{ + public GraphViewModel GraphViewModel{ get{ - return graphViewData ??= new GraphViewData(); + return graphViewModel ??= new GraphViewModel(); } - set => graphViewData = value; + set => graphViewModel = value; } #endif diff --git a/TNode/TNodeGraphViewImpl/Editor/Cache/NodeEditorExtensions.cs b/TNode/TNodeGraphViewImpl/Editor/Cache/NodeEditorExtensions.cs index 8e8061f..b32188a 100644 --- a/TNode/TNodeGraphViewImpl/Editor/Cache/NodeEditorExtensions.cs +++ b/TNode/TNodeGraphViewImpl/Editor/Cache/NodeEditorExtensions.cs @@ -2,10 +2,11 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using TNode.TNodeCore.Editor.Blackboard; +using TNode.TNodeCore.Editor.EditorPersistence; using TNode.TNodeGraphViewImpl.Editor.GraphBlackboard; using TNode.TNodeGraphViewImpl.Editor.NodeGraphView; using TNode.TNodeGraphViewImpl.Editor.NodeViews; -using TNodeCore.Editor.Blackboard; using TNodeCore.Editor.EditorPersistence; using TNodeCore.Editor.NodeGraphView; using TNodeCore.Runtime.Attributes; diff --git a/TNode/TNodeGraphViewImpl/Editor/GraphBlackboard/DefaultGraphBlackboardView.cs b/TNode/TNodeGraphViewImpl/Editor/GraphBlackboard/DefaultGraphBlackboardView.cs index 6fde335..6f5a3f2 100644 --- a/TNode/TNodeGraphViewImpl/Editor/GraphBlackboard/DefaultGraphBlackboardView.cs +++ b/TNode/TNodeGraphViewImpl/Editor/GraphBlackboard/DefaultGraphBlackboardView.cs @@ -2,9 +2,9 @@ using System.Collections; using System.Linq; using System.Reflection; +using TNode.TNodeCore.Editor.Serialization; using TNode.TNodeGraphViewImpl.Editor.Search; using TNodeCore.Editor.NodeGraphView; -using TNodeCore.Editor.Serialization; using TNodeCore.Runtime.Attributes; using TNodeCore.Runtime.Models; using UnityEditor; @@ -86,7 +86,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.GraphBlackboard{ private static void CreateBlackboardDataEntryForListItem(FieldInfo field, SerializedObject serializedObject, bool isRuntimeGraph, BlackboardSection blackboardSection, int index){ - var property = serializedObject.FindProperty("data"); + var property = serializedObject.FindProperty("model"); property = property.FindPropertyRelative(field.Name).GetArrayElementAtIndex(index); BlackboardDataEntry entry = new BlackboardDataEntry(field.FieldType){ @@ -112,7 +112,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.GraphBlackboard{ var foldoutData = new Foldout{ }; var drawer = - new GraphBlackboardPropertyField(serializedObject.FindProperty("data").FindPropertyRelative(field.Name), + new GraphBlackboardPropertyField(serializedObject.FindProperty("model").FindPropertyRelative(field.Name), isRuntimeGraph); drawer.Bind(serializedObject); foldoutData.Add(drawer); diff --git a/TNode/TNodeGraphViewImpl/Editor/GraphBlackboard/GraphBlackboardView.cs b/TNode/TNodeGraphViewImpl/Editor/GraphBlackboard/GraphBlackboardView.cs index 7ba13c5..e4ec655 100644 --- a/TNode/TNodeGraphViewImpl/Editor/GraphBlackboard/GraphBlackboardView.cs +++ b/TNode/TNodeGraphViewImpl/Editor/GraphBlackboard/GraphBlackboardView.cs @@ -1,4 +1,4 @@ -using TNodeCore.Editor.Blackboard; +using TNode.TNodeCore.Editor.Blackboard; using TNodeCore.Editor.NodeGraphView; using TNodeCore.Runtime.Models; using UnityEditor; diff --git a/TNode/TNodeGraphViewImpl/Editor/Inspector/NodeInspector.cs b/TNode/TNodeGraphViewImpl/Editor/Inspector/NodeInspector.cs index 94f01ae..a5f1108 100644 --- a/TNode/TNodeGraphViewImpl/Editor/Inspector/NodeInspector.cs +++ b/TNode/TNodeGraphViewImpl/Editor/Inspector/NodeInspector.cs @@ -35,7 +35,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.Inspector{ private void RefreshInspector(){ - //iterate field of data and get name of every fields,create a new inspector item of appropriate type and add it to the inspector for each field + //iterate field of model and get name of every fields,create a new inspector item of appropriate type and add it to the inspector for each field var body = this.Q("InspectorBody"); body.Clear(); body.StretchToParentSize(); diff --git a/TNode/TNodeGraphViewImpl/Editor/Inspector/NodeInspectorInNode.cs b/TNode/TNodeGraphViewImpl/Editor/Inspector/NodeInspectorInNode.cs index 6715679..a7195e7 100644 --- a/TNode/TNodeGraphViewImpl/Editor/Inspector/NodeInspectorInNode.cs +++ b/TNode/TNodeGraphViewImpl/Editor/Inspector/NodeInspectorInNode.cs @@ -1,6 +1,6 @@ using System.Reflection; +using TNode.TNodeCore.Editor.Serialization; using TNodeCore.Editor.NodeGraphView; -using TNodeCore.Editor.Serialization; using TNodeCore.Runtime.Attributes; using TNodeCore.Runtime.Models; using UnityEditor; @@ -38,7 +38,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.Inspector{ private void RefreshPropertyDrawer(){ - //Check if the data's type is a generic type of BlackboardDragNodeData<> + //Check if the model's type is a generic type of BlackboardDragNodeData<> if (_data.GetType().IsSubclassOf(typeof(BlackboardDragNodeData))){ return; } @@ -49,7 +49,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.Inspector{ var showInNodeViewAttribute = field.GetCustomAttribute() != null; if (!showInNodeViewAttribute) continue; - var drawer = new PropertyField(serializedObject.FindProperty("data").FindPropertyRelative(field.Name)); + var drawer = new PropertyField(serializedObject.FindProperty("model").FindPropertyRelative(field.Name)); drawer.RegisterValueChangeCallback((evt) => { serializedObject.Update(); serializedObject.ApplyModifiedProperties(); diff --git a/TNode/TNodeGraphViewImpl/Editor/NodeGraphView/DataGraphView.cs b/TNode/TNodeGraphViewImpl/Editor/NodeGraphView/DataGraphView.cs index 1c89460..93462a0 100644 --- a/TNode/TNodeGraphViewImpl/Editor/NodeGraphView/DataGraphView.cs +++ b/TNode/TNodeGraphViewImpl/Editor/NodeGraphView/DataGraphView.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Threading.Tasks; +using TNode.TNodeCore.Editor.Blackboard; +using TNode.TNodeCore.Editor.EditorPersistence; using TNode.TNodeCore.Editor.Models; using TNode.TNodeGraphViewImpl.Editor.Cache; using TNode.TNodeGraphViewImpl.Editor.GraphBlackboard; @@ -11,9 +13,7 @@ using TNode.TNodeGraphViewImpl.Editor.NodeViews; using TNode.TNodeGraphViewImpl.Editor.Placemats; using TNode.TNodeGraphViewImpl.Editor.Search; using TNodeCore.Editor; -using TNodeCore.Editor.Blackboard; using TNodeCore.Editor.EditorPersistence; -using TNodeCore.Editor.Models; using TNodeCore.Editor.NodeGraphView; using TNodeCore.Editor.Tools.NodeCreator; @@ -42,7 +42,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ private Dictionary _nodeDict = new Dictionary(); private IBlackboardView _blackboard; private bool _loaded; - private GraphViewData _graphViewData; + private GraphViewModel _graphViewModel; public T Data{ get{ return _data; } set{ @@ -102,7 +102,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ name = "HintLabel" }; visualElement.RegisterCallback((evt) => { - //check if the dragged object is a graph data or a Game Object contains a runtime graph + //check if the dragged object is a graph model or a Game Object contains a runtime graph var res = DragAndDrop.objectReferences; foreach (var obj in res){ if (obj is T graphData){ @@ -118,7 +118,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ BuildRuntimeGraphBehaviour(); Data = gameObject.GetComponent().graphData as T; if(Data==null){ - Debug.LogError($"Dragged a wrong graph data to editor,expected {typeof(T)} but got {gameObject.GetComponent().graphData.GetType()}"); + Debug.LogError($"Dragged a wrong graph model to editor,expected {typeof(T)} but got {gameObject.GetComponent().graphData.GetType()}"); } } } @@ -127,7 +127,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ } }); visualElement.RegisterCallback((evt) => { - //check if the dragged object is a graph data or a Game Object contains a runtime graph + //check if the dragged object is a graph model or a Game Object contains a runtime graph var res = DragAndDrop.objectReferences; foreach (var obj in res){ if (obj is GraphData graphData){ @@ -197,25 +197,25 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ Debug.Log(targetPos); SearchWindow.Open(searchWindowContext, searchWindow); }); - evt.menu.AppendAction("Create PlacematData",dma=> { + evt.menu.AppendAction("Create PlacematModel",dma=> { //find placemat container var placematContainer = GetPlacematContainer(); var targetPos = this.viewTransform.matrix.inverse.MultiplyPoint(dma.eventInfo.localMousePosition); var dmaPosRect = new Rect(targetPos,new Vector2(500,500)); var placemat = placematContainer.CreatePlacemat(dmaPosRect,1,"Title"); - var placematData = new PlacematData{ + var placematData = new PlacematModel{ title = "Title", positionInView = dmaPosRect }; - placemat.PlacematData = placematData; + placemat.PlacematModel = placematData; AddPlacemat(placematData); }); }); } - private void AddPlacemat(PlacematData data){ - _data.EditorModels.Add(data); + private void AddPlacemat(PlacematModel model){ + _data.EditorModels.Add(model); } private PlacematContainer GetPlacematContainer(){ @@ -354,7 +354,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ } private void OnDragUpdated(DragUpdatedEvent evt){ - //check if the drag data is BlackboardField + //check if the drag model is BlackboardField if (DragAndDrop.GetGenericData("DragSelection") is List data){ if (data.Count <= 0) return; DragAndDrop.visualMode = DragAndDropVisualMode.Move; @@ -417,18 +417,18 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ newEdge.output?.Connect(newEdge); AddElement(newEdge); } - var placemats = _data.EditorModels.OfType(); + var placemats = _data.EditorModels.OfType(); foreach (var placemat in placemats){ var container = GetPlacematContainer(); var res = container.CreatePlacemat(placemat.positionInView, 0, placemat.title); - res.PlacematData = placemat; + res.PlacematModel = placemat; } _nodeDict.Clear(); } private void LoadPersistentGraphViewData(){ - var r= _data.GraphViewData; + var r= _data.GraphViewModel; this.viewTransformChanged-=OnViewTransformChanged; this.UpdateViewTransform(r.persistOffset,new Vector3(r.persistScale,r.persistScale,1)); this.viewTransformChanged+=OnViewTransformChanged; @@ -437,8 +437,8 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ private void OnViewTransformChanged(GraphView graphview){ if (_data == null) return; - _data.GraphViewData.persistOffset = graphview.viewTransform.position; - _data.GraphViewData.persistScale = graphview.viewTransform.scale.x; + _data.GraphViewModel.persistOffset = graphview.viewTransform.position; + _data.GraphViewModel.persistScale = graphview.viewTransform.scale.x; } private void AddPersistentNode(NodeData dataNode){ @@ -551,7 +551,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ Debug.Log(placemats.Count); foreach (var placemat in placemats){ if (placemat is PlacematView placematView){ - _data.EditorModels.Add(placematView.PlacematData); + _data.EditorModels.Add(placematView.PlacematModel); } } } @@ -628,7 +628,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ #region implement interfaces /// - /// Simultaneously add the node to the graph data and add the node to the graph view + /// Simultaneously add the node to the graph model and add the node to the graph view /// /// /// The give rect is the actual position in the graph view @@ -693,8 +693,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ RemoveElement(edge); } } - //TODO: rect x,y move to node region - Owner.graphEditorData.graphElementsData.RemoveAll(x => x.guid == nodeData.id); + } public void AddLink(NodeLink nodeLink){ @@ -730,7 +729,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ UpdateBlackboardData(); OnDataChanged+= (sender, e) => { UpdateBlackboardData(); }; if(_data.blackboardData!=null){ - _data.GraphViewData.isBlackboardOn = true; + _data.GraphViewModel.isBlackboardOn = true; } } diff --git a/TNode/TNodeGraphViewImpl/Editor/NodeGraphView/SimpleGraphSubWindow.cs b/TNode/TNodeGraphViewImpl/Editor/NodeGraphView/SimpleGraphSubWindow.cs index 57d029a..1af4330 100644 --- a/TNode/TNodeGraphViewImpl/Editor/NodeGraphView/SimpleGraphSubWindow.cs +++ b/TNode/TNodeGraphViewImpl/Editor/NodeGraphView/SimpleGraphSubWindow.cs @@ -1,11 +1,12 @@ using System.Linq; +using TNode.TNodeCore.Editor.EditorPersistence; using TNodeCore.Editor.EditorPersistence; using UnityEditor; using UnityEditor.Experimental.GraphView; using UnityEngine.UIElements; namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ - public class SimpleGraphSubWindow:GraphElement,IGraphViewPersistence{ + public class SimpleGraphSubWindow:GraphElement{ private readonly Dragger _dragger = new Dragger(); protected void ConstructWindowBasicSetting(){ @@ -39,17 +40,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.NodeGraphView{ throw new System.NotImplementedException(); } - public void ResetPos(GraphEditorData editorData){ - var res = editorData.graphElementsData.FirstOrDefault(x => x.guid == this.GetPersistenceId()); - } - - public void SavePos(GraphEditorData editorData){ - - } - public void OnRemoveFromGraph(GraphEditorData editorData){ - - } } diff --git a/TNode/TNodeGraphViewImpl/Editor/NodeViews/DragNodeView.cs b/TNode/TNodeGraphViewImpl/Editor/NodeViews/DragNodeView.cs index e7eefd7..030fac4 100644 --- a/TNode/TNodeGraphViewImpl/Editor/NodeViews/DragNodeView.cs +++ b/TNode/TNodeGraphViewImpl/Editor/NodeViews/DragNodeView.cs @@ -1,5 +1,5 @@ using TilemapGenerator.ThirdParty.Extensions; -using TNodeCore.Editor.Serialization; +using TNode.TNodeCore.Editor.Serialization; using TNodeCore.Runtime.Attributes; using TNodeCore.Runtime.Models; using UnityEditor; diff --git a/TNode/TNodeGraphViewImpl/Editor/NodeViews/NodeView.cs b/TNode/TNodeGraphViewImpl/Editor/NodeViews/NodeView.cs index b7ed2a8..c9ac247 100644 --- a/TNode/TNodeGraphViewImpl/Editor/NodeViews/NodeView.cs +++ b/TNode/TNodeGraphViewImpl/Editor/NodeViews/NodeView.cs @@ -1,10 +1,10 @@ using System; using System.Linq; using System.Reflection; +using TNode.TNodeCore.Editor.Serialization; using TNode.TNodeGraphViewImpl.Editor.Inspector; using TNode.TNodeGraphViewImpl.Editor.Ports; using TNodeCore.Editor.NodeGraphView; -using TNodeCore.Editor.Serialization; using TNodeCore.Runtime; using TNodeCore.Runtime.Attributes; using TNodeCore.Runtime.Attributes.Ports; diff --git a/TNode/TNodeGraphViewImpl/Editor/Placemats/PlacematView.cs b/TNode/TNodeGraphViewImpl/Editor/Placemats/PlacematView.cs index 882cfd1..f37f9ec 100644 --- a/TNode/TNodeGraphViewImpl/Editor/Placemats/PlacematView.cs +++ b/TNode/TNodeGraphViewImpl/Editor/Placemats/PlacematView.cs @@ -1,38 +1,35 @@ - - - -using TNodeCore.Editor.Models; +using TNode.TNodeCore.Editor.Models; using UnityEditor.Experimental.GraphView; using UnityEngine; using UnityEngine.UIElements; namespace TNode.TNodeGraphViewImpl.Editor.Placemats{ public class PlacematView:Placemat{ - public PlacematData PlacematData{ - get => _placematData; + public PlacematModel PlacematModel{ + get => _placematModel; set{ - _placematData = value; + _placematModel = value; UpdatePlacematData(); } } - private PlacematData _placematData; + private PlacematModel _placematModel; public int zOrder {get;set;} public PlacematView(){ var title = this.Q(); title.RegisterValueChangedCallback(evt => { - PlacematData.title = title.value; + PlacematModel.title = title.value; }); } public virtual void UpdatePlacematData(){ - SetPosition(_placematData.positionInView); + SetPosition(_placematModel.positionInView); this.Color = new Color(43/255.0f, 72/255.0f, 101/255.0f); } public sealed override void SetPosition(Rect newPos){ base.SetPosition(newPos); - if (_placematData == null){ + if (_placematModel == null){ return; } - _placematData.positionInView = newPos; + _placematModel.positionInView = newPos; } public virtual void Collapse(){ this.Collapsed = true; diff --git a/TNode/TNodeGraphViewImpl/Editor/Search/BlackboardSearchWindowProvider.cs b/TNode/TNodeGraphViewImpl/Editor/Search/BlackboardSearchWindowProvider.cs index be8e56d..d362a2b 100644 --- a/TNode/TNodeGraphViewImpl/Editor/Search/BlackboardSearchWindowProvider.cs +++ b/TNode/TNodeGraphViewImpl/Editor/Search/BlackboardSearchWindowProvider.cs @@ -1,8 +1,8 @@ using System; using System.Collections; using System.Collections.Generic; +using TNode.TNodeCore.Editor.Blackboard; using TNode.TNodeGraphViewImpl.Editor.GraphBlackboard; -using TNodeCore.Editor.Blackboard; using TNodeCore.Editor.NodeGraphView; using UnityEditor; using UnityEditor.Experimental.GraphView; diff --git a/TNode/TNodeGraphViewImpl/Editor/Search/NodeSearchWindowProvider.cs b/TNode/TNodeGraphViewImpl/Editor/Search/NodeSearchWindowProvider.cs index c661713..8b488d9 100644 --- a/TNode/TNodeGraphViewImpl/Editor/Search/NodeSearchWindowProvider.cs +++ b/TNode/TNodeGraphViewImpl/Editor/Search/NodeSearchWindowProvider.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using TNode.TNodeGraphViewImpl.Editor.Cache; using TNodeCore.Editor.NodeGraphView; -using TNodeCore.Editor.Serialization; using TNodeCore.Editor.Tools.NodeCreator; using TNodeCore.Runtime.Models; using UnityEditor;