public void UpdateSpline()
 {
     if (spline == null)
     {
         return;
     }
     if (!isClosed && spline.isClosed)
     {
         spline.Break();
     }
     else if (spline.isClosed && points.Length < 4)
     {
         spline.Break();
         isClosed = false;
     }
     spline.SetPoints(points);
     if (isClosed && !spline.isClosed)
     {
         spline.Close();
     }
     spline.type       = splineType;
     spline.sampleRate = sampleRate;
     spline.is2D       = is2D;
     spline.EditorUpdateConnectedNodes();
 }
Exemplo n.º 2
0
 public void UndoRedoPerformed()
 {
     pathEditor.points = spline.GetPoints();
     pathEditor.UndoRedoPerformed();
     spline.EditorUpdateConnectedNodes();
     spline.Rebuild();
 }