void OnEnable() { point = target as BezierPoint; // spline = point.GetComponentInParent <BezierSpline>(); if (spline != null && !spline.Equals(null)) { spline.Refresh(); } Undo.undoRedoPerformed -= OnUndoRedo; Undo.undoRedoPerformed += OnUndoRedo; }
public float GetNormalizedT(float localT) { BezierSpline spline = point1.GetComponentInParent <BezierSpline>(); return((index1 + localT) / (spline.loop ? spline.Count : (spline.Count - 1))); }