Unity 2022.2 includes updates to the Splines package, accessible through the Package Manager, which offers you the ability to draw and use spline paths in your game or other creation. For developers, this means you can easily build out rivers, roads, camera tracks, and other path-related features and tools. If you’re an artist, you get a consistent, Unity-supported experience across all these toolsets using our Splines solution. Several default components are also included with the Splines package, so you can use this new artist tooling right away.
If you’d like to jump right into learning and discussing the new Splines package, head over to the Unity Splines forum post.
A “spline” is a type of path that is often used in both 3D and 2D creative tools. Essentially, you set a few points as if you are mapping out a road, then optionally tweak how the path curves around those points, and, finally, connect more branching points if you need them… that’s your spline!
Splines are often used to:
The Splines package enables you to create and use splines as easily as you would any other object. Open the GameObject menu to create a spline, then add whatever components you want to use that spline’s path.
As an artist, this means you just need to learn one set of tools to draw roads onto your terrain, define camera paths, or extrude mesh shapes for level design. Even better, the spline you draw for your camera can be reused to place a path on the ground, to navigate characters, or anything else. Just add or swap out components as needed.
For developers, the Splines package provides a robust and standardized framework to build on. Create your own custom components or Unity Asset Store packages. For more information, see the Splines API documentation.
Create or open a project on Unity 2022.2 or later, then install the Splines package using the Package Manager.
To create a spline:
For more information, see the Splines documentation.
Splines is the first major feature to use our new tooling system, contextual workflows. Contextual workflows use overlays to get you the right tools at the right time. You can see them in action in these cases:
The best part here is that contextual tooling can work with any toolset in Unity, including the Unity Asset Store or other custom creations. If you’re a tool developer and need help setting this up, start with the tools documentation, or reach out on the Unity Forums.
Speaking of components, we’ve included three to meet the common uses cases:
New in Splines 2.1, you can build splines with multiple, branching paths. Activate the Draw Splines tool, and begin drawing new parts onto the spline. This also enables you to create disconnected spline sections.
You can directly manipulate splines quickly without having to hunt through menus for the right transform tool or gizmo. When you are editing spline points, click-drag a point to move it. No tool activation needed! This is designed to bring 2D-like simplicity of editing to splines.
When editing spline points, these new options are available in the handle orientation dropdown. Parent enables you to move, rotate, or scale items relative to their parent element. Element gives you precise editing using the selected item’s directionality.
Splines was built to be a foundation for other tooling, especially tools from the Unity Asset Store and custom creations. The package includes a robust API and samples for developers to learn from or customize. Check out the Splines API documentation to get started.
The Splines package has been publicly available for almost a year now. Your continuous input has been fantastic, and we’re excited to hear even more, especially from artists, with this major update. Comments here are great, and for deeper discussions we hope to see you on the Splines forum thread.