refactor:rename [ShowInNodeView] Attribute to [ShowInNode] and start to make a better graph creator tool

main
taoria 3 years ago
parent fc2395fdf1
commit 9c5a734ad7
  1. 3
      TNode/GraphCreator.meta
  2. 3
      TNode/GraphCreator/Editor.meta
  3. 7
      TNode/GraphCreator/Editor/GraphCreator.cs
  4. 3
      TNode/GraphCreator/Editor/GraphCreator.cs.meta
  5. 3
      TNode/GraphCreator/Runtime.meta
  6. 3
      TNode/GraphCreator/Runtime/Blackboard.meta
  7. 9
      TNode/GraphCreator/Runtime/Blackboard/GraphMetaBlackboard.cs
  8. 3
      TNode/GraphCreator/Runtime/Blackboard/GraphMetaBlackboard.cs.meta
  9. 1
      TNode/GraphCreator/Runtime/GraphMetaNode.cs
  10. 3
      TNode/GraphCreator/Runtime/GraphMetaNode.cs.meta
  11. 6
      TNode/GraphCreator/Runtime/MetaGraph.cs
  12. 3
      TNode/GraphCreator/Runtime/MetaGraph.cs.meta
  13. 3
      TNode/GraphCreator/Runtime/Nodes.meta
  14. 17
      TNode/GraphCreator/Runtime/Nodes/GraphMetaNode.cs
  15. 3
      TNode/GraphCreator/Runtime/Nodes/GraphMetaNode.cs.meta
  16. 8
      TNode/TNodeCore/Editor/GraphCreatorEditor.cs
  17. 3
      TNode/TNodeCore/Editor/GraphCreatorEditor.cs.meta
  18. 2
      TNode/TNodeCore/Runtime/Attributes/ShowInNode.cs
  19. 0
      TNode/TNodeCore/Runtime/Attributes/ShowInNode.cs.meta
  20. 2
      TNode/TNodeGraphViewImpl/Editor/Inspector/NodeInspectorInNode.cs

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b880945b54834ff892ab441f95ebf64a
timeCreated: 1659601013

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 088ae3752f0e44ad91bf019cc64536fc
timeCreated: 1659601180

@ -0,0 +1,7 @@
using TNodeCore.Editor;
namespace TNode.GraphCreator.Editor{
public class GraphCreator:GraphEditor<MetaGraph>{
}
}

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b727fc33cca34734bff028a952645808
timeCreated: 1659601005

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e10ab803f7cf4762b5e72874dc3a69a0
timeCreated: 1659601201

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3a0683e43c164065927b50fc72d9065c
timeCreated: 1659601323

@ -0,0 +1,9 @@
using TNodeCore.Editor.EditorPersistence;
using TNodeCore.Runtime.Models;
namespace TNode.GraphCreator.Runtime.Blackboard{
public class GraphMetaBlackboard:BlackboardData{
}
}

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 33c75ee828f4484abbe9009859357182
timeCreated: 1659601335

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e4bc602c13c042819a553d6142faf3ba
timeCreated: 1659601223

@ -0,0 +1,6 @@
using TNodeCore.Runtime.Models;
namespace TNode.GraphCreator.Editor{
public class MetaGraph : GraphData{
}
}

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e0047d8d81f646128eab9c94957129f4
timeCreated: 1659601169

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a54e22f7a85c4befbf19d09e14259869
timeCreated: 1659601272

@ -0,0 +1,17 @@
using System;
using TNode.GraphCreator.Editor;
using TNodeCore.Runtime.Attributes;
namespace TNode.GraphCreator.Runtime.Nodes{
using TNodeCore.Runtime.Models;
namespace TNode.GraphCreator.Runtime{
[GraphUsage(typeof(MetaGraph))]
[Serializable]
public class GraphMetaNode:NodeData{
[ShowInNode]
public string createNodeName;
}
}
}

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3f00e9ec34ac442da5e7b7b21042e37b
timeCreated: 1659601280

@ -0,0 +1,8 @@
using UnityEditor;
namespace TNodeCore.Editor{
public class GraphCreatorEditor:EditorWindow{
}
}

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 059e73589b764d7db8e53b75c86d634d
timeCreated: 1659600695

@ -3,7 +3,7 @@
namespace TNodeCore.Runtime.Attributes{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
public class ShowInNodeViewAttribute:System.Attribute{
public class ShowInNode:System.Attribute{
}
}

@ -46,7 +46,7 @@ namespace TNode.TNodeGraphViewImpl.Editor.Inspector{
foreach (var field in _data.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public|BindingFlags.NonPublic)){
//Create corresponding property field
//check if the field has ShowInNodeView attribute
var showInNodeViewAttribute = field.GetCustomAttribute<ShowInNodeViewAttribute>() != null;
var showInNodeViewAttribute = field.GetCustomAttribute<ShowInNode>() != null;
if (!showInNodeViewAttribute)
continue;
var drawer = new PropertyField(serializedObject.FindProperty("data").FindPropertyRelative(field.Name));

Loading…
Cancel
Save