private EdgeRenderer GetEdgeRenderer(int fromNode) { EdgeRenderer edgeRenderer = Points[fromNode].GetComponent <EdgeRenderer>(); if (!edgeRenderer) { edgeRenderer = Points[fromNode].AddComponent <EdgeRenderer>(); edgeRenderer.StartNode = Points[fromNode].transform.position; } return(edgeRenderer); }
private void AddPointToRenderer(EdgeRenderer edgeRenderer, int toNode) { edgeRenderer.TargetNodes.Add(Points[toNode].transform.position); }