예제 #1
0
        void OnEnable()
        {
            point  = target as BezierPoint;                                     //
            spline = point.GetComponentInParent <BezierSpline>();

            if (spline != null && !spline.Equals(null))
            {
                spline.Refresh();
            }

            Undo.undoRedoPerformed -= OnUndoRedo;
            Undo.undoRedoPerformed += OnUndoRedo;
        }
예제 #2
0
            public float GetNormalizedT(float localT)
            {
                BezierSpline spline = point1.GetComponentInParent <BezierSpline>();

                return((index1 + localT) / (spline.loop ? spline.Count : (spline.Count - 1)));
            }