Example #1
0
 public void InitGraphViews(BaseGraphView graphViewPrefab, Transform parent, NodeTemplate nodeTemplate, EdgeTemplate edgeTemplate)
 {
     foreach (var chunk in _chunks)
     {
         chunk.InitGraphView(graphViewPrefab, parent, nodeTemplate, edgeTemplate);
         var center = _min + _chunkRange * 0.5f +
                      new Vector3(
             _chunkRange.x * chunk.Index.x,
             _chunkRange.y * chunk.Index.y,
             _chunkRange.z * chunk.Index.z
             );
         chunk.GraphView.SetBounds(center, _chunkRange);
         chunk.GraphView.name = "GraphView " + chunk.Index;
     }
 }
Example #2
0
 protected virtual void SetNodeTemplate(NodeTemplate nodeTemplate)
 {
     _nodeTemplate = nodeTemplate;
 }
Example #3
0
 public void InitGraphView(BaseGraphView graphViewPrefab, Transform parent, NodeTemplate nodeTemplate, EdgeTemplate edgeTemplate)
 {
     GraphView = Instantiate(graphViewPrefab, parent, false);
     GraphView.NodeTemplate = nodeTemplate;
     GraphView.EdgeTemplate = edgeTemplate;
     GraphView.MouseDown   += GraphView_MouseDown;
     GraphView.MouseMove   += GraphView_MouseMove;
     GraphView.MouseUp     += GraphView_MouseUp;
     GraphView.SetGraph(NodePresenters, EdgePresenters);
 }
Example #4
0
 protected override void SetNodeTemplate(NodeTemplate nodeTemplate)
 {
     base.SetNodeTemplate(nodeTemplate);
     // TODO: set Material
 }