Skip to content

Commit 096fab7

Browse files
author
Unity Technologies
committed
com.unity.splines@2.8.2
## [2.8.2] - 2025-09-18 ### Fixed - [DOCATT-4646], [DOCATT-5603], [DOCATT-7045], [DOCATT-5044], [DOCATT-6376], [DOCATT-6626] Clarified API documentation following user feedback. - [SPLB-360] Fixed a bug when selecting the clear component option, resulting in out of range exception - [SPLB-361] Fixed a bug where the spline would not animate with Scene/Domain reload disabled upon entering playmode - [SPLB-356] Fixed a bug where a null reference exception would occur after baking a SplineInstantiate component and then pressing Undo.
1 parent 189ad5a commit 096fab7

File tree

15 files changed

+142
-101
lines changed

15 files changed

+142
-101
lines changed

.attestation.p7m

10.6 KB
Binary file not shown.

.signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":1746566855,"signature":"HO9p3RckbKRJ5YvxQd7RtLCnqtt70oreKaLOX0+od464rkH0TMrtqHCDfRnNYKvVHkN01BA3bC6IY50nzBDNjOzuH6njPDpuwRsbbj9VvBhhZK09aRadXrl7c0lc5QD71xuZNO1VU8rVXRot5xGvd0p0tIxlpmZ9PeKZXfNaD0qnPTiXxAUJdQpdBpNwLz3ujQRaFUR4+HckNjtnivESM57H98QZq6rZatgr/UJNCbVkuTo4yejDJE2jU48rx61lgODj2qq9u2JZNpjjubXSb7tooe3sLU5zMI8ArzX+i3M1SeS5bSRM3DLTrkirRQaPQCTxJK0JPO1smZ3XusJBT6d611rPortvFOdc2ZcnjolP+ep9BJAGbA7L/Uebl4il/dw0jRV0fWieqM9EqK7jA4ye8ftUOJmIcxDgpHGntjuGsbaV4X+OV/co6eaof2FgXbhmAlSXoelEOHO7TFFE6u0le2Y4hdZNqImn2bF8DUPM9ngavrUKIZwsTAqNKBrG","publicKey":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQm9qQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FZOEFNSUlCaWdLQ0FZRUFzdUhXYUhsZ0I1cVF4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letions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,31 @@ All notable changes to this package will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [2.8.2] - 2025-09-18
9+
10+
### Fixed
11+
12+
- [DOCATT-4646], [DOCATT-5603], [DOCATT-7045], [DOCATT-5044], [DOCATT-6376], [DOCATT-6626] Clarified API documentation following user feedback.
13+
- [SPLB-360] Fixed a bug when selecting the clear component option, resulting in out of range exception
14+
- [SPLB-361] Fixed a bug where the spline would not animate with Scene/Domain reload disabled upon entering playmode
15+
- [SPLB-356] Fixed a bug where a null reference exception would occur after baking a SplineInstantiate component and then pressing Undo.
16+
817
## [2.8.1] - 2025-03-28
918

10-
### Bug Fixes
19+
### Fixed
20+
1121
- [SPLB-345] Fixed a bug which was causing null reference exceptions during shutdown in IL2CPP builds.
12-
- [SPLB-337] Fixed a bug where `JoinSplinesOnKnots` would throw a null reference exception when one of the splines was linked with another spline.
22+
- [SPLB-343] Fixed a bug where `JoinSplinesOnKnots` would throw a null reference exception when one of the splines was linked with another spline.
1323
- [SPLB-341] Fixed a bug where changing the tangent mode on a knot on a prefab would not persist when entering play mode.
1424

1525
### Changed
16-
- Internal code cleanup to align with release standards.
26+
27+
- Cleaned up internal code to align with release standards.
1728

1829
## [2.8.0] - 2025-03-13
1930

20-
### Bug Fixes
31+
### Fixed
32+
2133
- [SPLB-322] Fixed a bug where `SplineExtrude` wouldn't update when multiple splines where modified.
2234
- [SPLB-323] Fixed a bug where splines displayed in the Scene view would not match serialization changes.
2335
- [SPLB-324] Re-added a dependency to the IMGUI module that was removed along with the UGUI package.
@@ -27,11 +39,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2739
- [SPLB-333] Fixed a bug where `Create Spline` tool would sometimes throw an exception when the Esc or Enter keys were pressed.
2840

2941
### Added
42+
3043
- [SPLB-329] Added the ability to target a mesh in the library with a `SplineExtrude` component
3144

3245
## [2.7.2] - 2024-11-08
3346

34-
### Bug Fixes
47+
### Fixed
48+
3549
- [SPLB-315] Fixed a bug where the `DrawSplineTool` icon was missing in the Tools overlay.
3650
- [STO-3434] Fixed a bug where the `DrawSplineTool` prevented the use of the View tool.
3751
- [STO-3435] Fixed a bug where the `DrawSplineTool` did not display the Tool settings overlay.
@@ -53,7 +67,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5367
- New `SplineExtrude` and `SplineMesh` option enables new extrusion profiles, including `Circle`, `Square`, `Road`, and `Spline`.
5468
- Added a section in the documentation for the `Source Spline Container` in the `SplineExtrude` component.
5569

56-
### Bug Fixes
70+
### Fixed
5771

5872
- [SPLB-292] Removed the dependency on the UGUI package.
5973
- Removed the toggle to override the target spline in the `SplineExtrude` inspector.
@@ -64,7 +78,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6478

6579
## [2.6.1] - 2024-05-23
6680

67-
### Bug Fixes
81+
### Fixed
6882

6983
- [SPLB-275] Fixed a bug where the `SplineContainer` component would throw warning when entering playmode.
7084
- [SPLB-266] Fixed a bug where instantiating a `SplineExtrude` component at runtime would throw errors.
@@ -86,7 +100,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
86100

87101
- Changed supported version in the documentation dropdown selector to 2022.3 and later.
88102

89-
### Bug Fixes
103+
### Fixed
90104

91105
- [SPLB-246] Fixed performance and garbage collection (GC) memory allocation issues when evaluating splines using `SplineContainer` API.
92106
- [STO-3176] Fixed an issue where `FitSplineToPoints` utility would not fit splines correctly.
@@ -108,7 +122,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
108122
- [SPLB-233] Removed transform handles while dragging a knot using direct manipulation.
109123
- [SPLB-234] Removed unnecessary spline metadata which was saved on disk.
110124

111-
### Bug Fixes
125+
### Fixed
112126

113127
- [SPLB-230] Fixed a bug where modifying the tangent mode on the last knot would change the spline shape unpredictably.
114128
- [SPLB-225] Fixed a bug where closing a Spline with the `Draw Splines Tool` had inconsistent behaviour.
@@ -120,7 +134,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
120134

121135
## [2.5.1] - 2023-10-17
122136

123-
### Bug Fixes
137+
### Fixed
124138

125139
- [SPLB-208] Fixed a bug where `SplineToolContext` would attempt to draw empty Splines and flood the console with errors.
126140

@@ -130,7 +144,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
130144

131145
- Exposed public API for `SplineInstantiate.Seed`.
132146

133-
### Bug Fixes
147+
### Fixed
134148

135149
- [SPLB-201] Fixed error messages showing in edit mode with spline components.
136150
- [SPLB-203] Fixed a bug where baking `SplineInstantiate` instances broke prefab connections.
@@ -160,7 +174,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
160174
- [SPLB-167] Changed the evaluation of up vectors to use a cache instead of re-evaluate the values on every single request.
161175
- In Editor versions of 2023.2 or newer, moved the following actions from the Element Inspector to the Scene view context menu: Link, Unlink, Split, Join, and Reverse Spline Flow.
162176

163-
### Bug Fixes
177+
### Fixed
164178

165179
- [SPLB-176] Fixed a regression where the up vector would not evaluate correctly for some curves.
166180
- Fixed the setter for SplineAnimate.Normalized time to handle ping-pong direction correctly when set.
@@ -174,7 +188,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
174188
- Exposed public APIs for `SplineTool` and `SplineHandles`.
175189
- Added a method to *bake* SplineInstantiate objects in the scene so the users can modify the resulting GameObjects.
176190

177-
### Bug Fixes
191+
### Fixed
178192

179193
- [SPLB-165] Fixed a bug that prevented actions from being retained with prefab instances that contained splines when entering playmode.
180194
- [SPLB-162] Fixed a bug where the start offset in `SplineAnimate` did not work in Play mode.

Documentation~/getting-started-with-splines.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

Editor/Components/SplineInstantiateEditor.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ protected void OnEnable()
200200

201201
bool Initialize()
202202
{
203-
if (m_Components != null && m_Components.Length > 0)
203+
if (m_SplineContainer != null && m_Components != null && m_Components.Length > 0)
204204
return true;
205205

206206
m_SplineContainer = serializedObject.FindProperty("m_Container");
@@ -359,13 +359,17 @@ public override void OnInspectorGUI()
359359
EditorGUILayout.EndHorizontal();
360360
EditorGUILayout.Separator();
361361

362-
foreach (var splineInstantiate in m_Components)
362+
// m_Components may have been made null as a result of the Bake operation (via OnDisable)
363+
if (m_Components != null)
363364
{
364-
if (dirtyInstances)
365-
splineInstantiate.SetDirty();
365+
foreach (var splineInstantiate in m_Components)
366+
{
367+
if (dirtyInstances)
368+
splineInstantiate.SetDirty();
366369

367-
if (updateInstances)
368-
splineInstantiate.UpdateInstances();
370+
if (updateInstances)
371+
splineInstantiate.UpdateInstances();
372+
}
369373
}
370374

371375
if (dirtyInstances || updateInstances)

Editor/Tools/SplineTool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public static HandleOrientation handleOrientation
137137
public override void OnActivated()
138138
{
139139
SplineSelection.changed += OnSplineSelectionChanged;
140-
Spline.afterSplineWasModified += AfterSplineWasModified;
140+
Spline.afterSplineWasModifiedSceneLoop += AfterSplineWasModified;
141141
Undo.undoRedoPerformed += UndoRedoPerformed;
142142
Tools.pivotRotationChanged += OnPivotRotationChanged;
143143
Tools.pivotModeChanged += OnPivotModeChanged;
@@ -152,7 +152,7 @@ public override void OnActivated()
152152
public override void OnWillBeDeactivated()
153153
{
154154
SplineSelection.changed -= OnSplineSelectionChanged;
155-
Spline.afterSplineWasModified -= AfterSplineWasModified;
155+
Spline.afterSplineWasModifiedSceneLoop -= AfterSplineWasModified;
156156
Undo.undoRedoPerformed -= UndoRedoPerformed;
157157
Tools.pivotRotationChanged -= OnPivotRotationChanged;
158158
Tools.pivotModeChanged -= OnPivotModeChanged;

Editor/Utilities/SplineExtrudeUtility.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ static void ObjectEventChangesPublished(ref ObjectChangeEventStream stream)
3636
if (type == ObjectChangeKind.ChangeGameObjectStructure)
3737
{
3838
stream.GetChangeGameObjectStructureEvent(i, out var changeGameObjectStructure);
39+
40+
#pragma warning disable CS0618 // Type or member is obsolete
3941
if (EditorUtility.InstanceIDToObject(changeGameObjectStructure.instanceId) is GameObject go)
42+
#pragma warning restore CS0618 // Type or member is obsolete
4043
CheckForSplineExtrudeAdded(go);
4144
}
4245
}

Runtime/BezierKnot.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public BezierKnot Transform(float4x4 matrix)
8989
}
9090

9191
/// <summary>
92-
/// Knot position addition. This operation only applies to the position, tangents and rotation are unmodified.
92+
/// Adds a knot position. This operation applies only to the position and does not modify tangents or rotation.
9393
/// </summary>
9494
/// <param name="knot">The target knot.</param>
9595
/// <param name="rhs">The value to add.</param>
@@ -100,7 +100,7 @@ public BezierKnot Transform(float4x4 matrix)
100100
}
101101

102102
/// <summary>
103-
/// Knot position subtraction. This operation only applies to the position, tangents and rotation are unmodified.
103+
/// Subtracts a knot position. This operation applies only to the position and does not modify tangents or rotation.
104104
/// </summary>
105105
/// <param name="knot">The target knot.</param>
106106
/// <param name="rhs">The value to subtract.</param>

Runtime/CurveUtility.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public static float3 EvaluatePosition(BezierCurve curve, float t)
4141

4242
/// <summary>
4343
/// Given a Bezier curve, return an interpolated tangent at ratio t.
44+
/// The tangent is the rate of change of the position of the curve at point `t`, with respect to `t`. It is the derivative of the position with respect to `t`.
4445
/// </summary>
4546
/// <param name="curve">A cubic Bezier curve.</param>
4647
/// <param name="t">A value between 0 and 1 representing the ratio along the curve.</param>
@@ -61,6 +62,7 @@ public static float3 EvaluateTangent(BezierCurve curve, float t)
6162

6263
/// <summary>
6364
/// Given a Bezier curve, return an interpolated acceleration at ratio t.
65+
/// The acceleration is the rate of change of the tangent of the curve at point `t`, with respect to `t`. It represents the derivative of the tangent, or the second derivative of the position, with respect to `t`.
6466
/// </summary>
6567
/// <param name="curve">A cubic Bezier curve.</param>
6668
/// <param name="t">A value between 0 and 1 representing the ratio along the curve.</param>

Runtime/Spline.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ public IEnumerable<string> GetSplineDataKeys(EmbeddedSplineDataType type)
278278

279279
#if UNITY_EDITOR
280280
internal static Action<Spline> afterSplineWasModified;
281+
internal static Action<Spline> afterSplineWasModifiedSceneLoop;
281282
[NonSerialized]
282283
bool m_QueueAfterSplineModifiedCallback;
283284
#endif
@@ -313,6 +314,7 @@ internal void SetDirty(SplineModification modificationEvent, int knotIndex = k_B
313314

314315
m_QueueAfterSplineModifiedCallback = true;
315316

317+
UnityEditor.SceneView.duringSceneGui += OnAfterSplineWasModifiedSceneLoop;
316318
UnityEditor.EditorApplication.delayCall += () =>
317319
{
318320
m_QueueAfterSplineModifiedCallback = false;
@@ -321,6 +323,14 @@ internal void SetDirty(SplineModification modificationEvent, int knotIndex = k_B
321323
#endif
322324
}
323325

326+
#if UNITY_EDITOR
327+
private void OnAfterSplineWasModifiedSceneLoop(UnityEditor.SceneView sceneView)
328+
{
329+
UnityEditor.SceneView.duringSceneGui -= OnAfterSplineWasModifiedSceneLoop;
330+
afterSplineWasModifiedSceneLoop?.Invoke(this);
331+
}
332+
#endif
333+
324334
/// <summary>
325335
/// Invoked any time a spline property is modified.
326336
/// </summary>

0 commit comments

Comments
 (0)