Hi guys. Can someone explore me, how i can draw lines like this: . And how i can select the desired line and delete it. i don’t understand how to implement it. now i use this method for creating:
void DrawNodeCurve(Rect start, Rect end)
{
Vector3 startPos = new Vector3(start.x + start.width, start.y + start.height / 2, 0);
Vector3 endPos = new Vector3(end.x, end.y + end.height / 2, 0);
Vector3 startTan = startPos + Vector3.right;// * 50;
Vector3 endTan = endPos + Vector3.left;// * 50;
Color shadowCol = new Color(0, 0, 0, 0.06f);
if (GUILayout.Button ("1")) {
c = id;
}
for (int i = 0; i < 3; i++)
// Draw a shadow
{
Handles.DrawBezier(startPos, endPos, startTan, endTan, shadowCol, null, (i + 1) * 5);
}
Handles.DrawBezier(startPos, endPos, startTan, endTan, Color.black, null, 1);
}
And for deleting, i use script, when i click to the button in window “delete connections”, script will find all connections in selected node and delete them all. So i need to implement solo line delete. Can someone help me?