public static AIGraphSerializer GetInstance(AIGraphView targetGraphView)
 {
     return(new AIGraphSerializer
     {
         _targetGraphView = targetGraphView,
         Edges = targetGraphView.edges.ToList(),
         Nodes = targetGraphView.nodes.ToList().Cast <ActorStateNode>().ToList()
     });
 }
示例#2
0
    public void Init(EditorWindow window, AIGraphView graphView)
    {
        _graphView = graphView;
        _window    = window;

        _iconFix = new Texture2D(1, 1);
        _iconFix.SetPixel(0, 0, new Color(0, 0, 0, 0));
        _iconFix.Apply();
    }
示例#3
0
    private void ConstructGraph()
    {
        _graphView = new AIGraphView
        {
            name = "AI Graph"
        };

        _graphView.StretchToParentSize();
        rootVisualElement.Add(_graphView);
    }
示例#4
0
 private void ConstructGraph()
 {
     //Create
     _graphView = new AIGraphView(this)
     {
         name = "AI Graph"
     };
     // Fill Window
     _graphView.StretchToParentSize();
     // Add the graphview to the window
     rootVisualElement.Add(_graphView);
 }
 public void UpdateVars(AIGraphView targetGraphView)
 {
     _targetGraphView = targetGraphView;
     Edges            = targetGraphView.edges.ToList();
     Nodes            = targetGraphView.nodes.ToList().Cast <ActorStateNode>().ToList();
 }
示例#6
0
 public static GraphSaveUtility GetInstance(AIGraphView targetGraphView)
 {
     return(new GraphSaveUtility {
         _targetGraphView = targetGraphView
     });
 }