Preview
Documentation is a draft, and is expanded as the package develops.
3.Editor Extensions
Installing this asset also adds several enhancements.
Spline Container inspector
You’ll find that the Spline Container inspector now shows a few new buttons:
2: Draw new Spline
3: Paint new Spline
4: Toggles debug info, such as spline lengths and bounds
5: Opens the context menu
6: Dropdown for adding new processor components
The context menu (6) contains a few utility functions:
Name | Function |
---|---|
Flatten (XYZ) | Positions all the knots to the current center of the Spline’s bounds, on the given axis. Useful when splines need to be flat. |
Flip (XYZ) | Mirrors the Spline on the given axis |
Center Pivot | Moves the position of the container’s Transform to the center of its Splines and shifts all knots in the opposite direction. This results in no change to the shape of the spline curve(s). |
Reverse Flow | Rotates the knots in the opposite direction and reorders them. For some tools, this may be necessary to get correct results. As this changes what is considered right- and left. |
Apply Transform | Repositions the knots and rotates them so that the Transform can safely be reset back to (0,0,0) without changing the apparent curve of the Spline |
Remove Twists | Resets the X and Y rotation value of all the knots to 0. Used to ensure rivers or roads are leveled. |
Create Spline From Selection
Go to GameObject->Spline->From Selection
A preview Spline will be displayed as you select objects, it is animated to show the direction of the Spline.
This functionality, under the hood, is identical to the Create Spline From Objects component.
Spline Visualizer component
Samples the assigned Splines within the container and visualizes its many attributes as scene-view gizmos.
If you’re developing using Splines or are curious about what certain information looks like, this is indispensable.