com.unity.splines 2.2.0

com.unity.splines

Notes: processedReleased March 24, 2023

Browse versions

PreviousNext

Unity Compatibility

Minimum Unity: 2021.3

Features

  • [SPLB-72] Added a public version of `SplineDataHandles.DataPointHandles` which requires an additional parameter, `splineID`.
  • [SPLB-72] Added the `SplineContainer.SplineAdded`, `SplineContainer.SplineRemoved` and `SplineContainer.SplineReordered` public events and removed those same events from `ISplineContainer`
  • [SPLB-72] Added the `SplineUtility.ReorderSpline` public method.
  • [SPLB-72] Added an example to the **Loft Road** sample that supports spline data for multiple splines.
  • Improved UI for editing points in the Inspector.
  • Added preference to disable tangent dragging feature in `Knot Placement` tool.
  • Added `ISplineContainer.AddSpline(Spline)` function overload.
  • Added new functions on `Spline` to get and set `SplineData`.
  • Added new `EmbeddedSplineData` type to easily create and reference `SplineData` stored on arbitrary `Spline` objects.

📈 Improvements

  • [SPLB-127] Changes made to a spline in the Inspector no longer invoke the `Spline.Changed` event with the `SplineModification.Default` type. The `Spline.Changed` event is still invoked, but with specific modification types like `SplineModification.KnotModified`.
  • [SPLB-118] Changed the documentation of `SplineMath.PointLineNearestPoint` and `SplineMath.RayLineNearestPoint` to explain the returned values more precisely.
  • [SPLB-96] Changed the default tension of tangents in **Auto** mode so they are smoother. **Auto** mode is now closer to the Catmull-Rom behavior of Splines 1.0.
  • [SPLB-72] Removed the `WidthSplineData` and `MultipleRoadBehaviour` components from the samples.
  • Reduced heap allocations when modifying Spline properties.
  • [SPLB-92] Modified the Inspector to use `SplineModification.KnotRemoved` events to remove knots and pass the index for each removed knot.
  • [SPLB-92] Modified the `Spline.SetTangentMode` and `Spline.SetAutoSmoothTension` methods to invoke `SplineModification.KnotModified` events for each modified knot and pass the index.
  • Increased the threshold for tangent dragging when placing knots with the `Knot Placement` tool.

🔧 Bug Fixes

  • [SPLB-141] Fixed a bug where `SplineExtrude` component would overwrite existing Mesh assets.
  • [SPLB-129] Fixed a bug where `CurveUtility.EvaluateUpVector` caused burst errors.
  • [SPLB-138] Fixed a bug where `SplineJobs.EvaluatePositionTangentNormal` returned incorrect values.
  • [SPLB-136] Fixed a bug where undoing actions on a spline was not marking the spline as dirty.
  • [SPLB-123] Fixed an inconsistency between inserting a `BezierKnot` using Editor tools and runtime API.
  • [SPLB-130] Fixed a bug that would crash the Editor if the `SplineInstantiate` component had its parent GameObject in the list of items to instantiate.
  • [SPLB-90] Fixed an issue where `Spline.SetKnotNoNotify` triggered change callbacks.
  • [SPLB-77] Fixed a null reference exception when spline animate didn't have a spline referenced.
  • [SPLB-125] Fixed issue where the spline would have different state during the `Spline.Changed` callback depending if it was modified using the API or inspector.
  • [SPLB-74] Fixed a bug that caused an error when knots were deleted from the Inspector.
  • [SPLB-121] Fixed a bug where spline data changes done using the Inspector would not undo correctly.
  • [SPLB-92] Fixed an issue where adding knot using the inspector would trigger `SplineModification.KnotInserted` event twice.
  • [SPLB-107] Fixed a bug where a duplicates of a spline with the Spline Instantiate component would have visible child GameObjects in the Hierarchy window.
  • [SPLB-65] Fixed an issue where it wasn't possible to add a knot to a closed spline that is empty or contains a single knot.
  • [SPLB-104] Fixed an issue where duplicating a spline using the Inspector would not copy knot link data.
  • [SPLB-82] Fixed an issue where it would not be possible to undo adding a knot from the Inspector.
  • [SPLB-84] Fixed an issue where the obsolete Spline Edit Mode would show in the Debug Inspector.
  • [SPLB-135] Fixed an issue where the Auto Smooth tangent mode would not smooth a spline's curves correctly.
  • [SPLB-104] Fixed an issue where shared knots would lose selection when a spline is selected using the Inspector.
  • [SPLB-115] Fixed an issue where using the Width tool on MacOS (Metal) would render visual artifacts outside of the Scene view.
  • [SPLB-98] Fixed an issue where `LoftRoadBehaviour` would create incorrect mesh geometry normals.
  • [STO-2791] Fixed an issue where spline data's reorderable list would break if the data was not the field of a `MonoBehaviour`.
  • [SPLB-86] Fixed a bug that caused a spline to change its shape when **Reverse Spline Flow** action was used.
  • [SPLB-103] Fixed an issue where the spline tool settings' Visuals popup would display toggle checkboxes on the wrong size and be clipped in some editor versions.
  • [SPLB-87] Fixed an issue where the cached Spline length could be incorrect after an undo action.
  • Fixed an issue where modifying knot values or order in the Inspector could affect unassociated knot data.
  • Fixed use of obsolete `Objects.FindObjectsOfType` API in Unity 2023.1 and newer.
  • Fixed incorrect icon import settings.
  • Fixed a bug that would prevent Spline Instantiate from instantiating when it was loaded from an addressable build in the Editor.
  • Fixed a bug where calling `SplineDataHandles.DataPointHandles` without a `splineID` argument would crash.
  • Fixed a bug that would cause `SplineData` handles to interfere with scene navigation.
  • Fixed SplineData handles not setting `GUI.changed` correctly.
  • Fixed an issue where `SplineSelection` errors could put the Scene view into an unrecoverable broken state.
  • Added a new property drawer for `int` interpreted as a spline index, `SplineIndexAttribute`.
  • Fixed a bug where modifying and undoing changes to `Spline` values in the Inspector resulted in an incorrect `Spline` length calculation.
  • Added `SplineData.OnSplineModified` function to attempt to preserve knot indices when knots are inserted or removed. This is called automatically for all embedded `SplineData` collections.