public void ConnectTo(NodeMapper nm) { /* * int index = neighbors.IndexOf(nm); * if (index > -1) * { * connection = index; * //Debug.Log(nm.transform.position); * lr.UpdateDestination(nm.transform.position); * } */ if (nm != null) { // Create New Line Renderer LineRenderer newLR = CreateLineRenderer(); // Give LR Reference to connecting node nm.AcceptConnection(nm, newLR); } }