namespace UnityEngine.Splines { /// /// Describes the different types of changes that can occur to a spline. /// public enum SplineModification { /// /// The default modification type. This is used when no other SplineModification types apply. /// Default, /// /// The spline's property was modified. /// ClosedModified, /// /// A knot was modified. /// KnotModified, /// /// A knot was inserted. /// KnotInserted, /// /// A knot was removed. /// KnotRemoved, /// /// A knot was reordered. /// KnotReordered } struct SplineModificationData { public readonly Spline @Spline; public readonly SplineModification Modification; public readonly int KnotIndex; // Length of curve before the edited knot (if insert then length of the curve inserted into). public readonly float PrevCurveLength; // Length of the edited knot's curve (has no meaning if modification is insert). public readonly float NextCurveLength; public SplineModificationData(Spline spline, SplineModification modification, int knotIndex, float prevCurveLength, float nextCurveLength) { Spline = spline; Modification = modification; KnotIndex = knotIndex; PrevCurveLength = prevCurveLength; NextCurveLength = nextCurveLength; } } }