Namespace UnityEngine.Splines
Classes
CurveUtility
A collection of methods for extracting information about BezierCurve types.
InterpolatorUtility
InterpolatorUtility provides easy access to all the different IInterpolator implementations.
KnotLinkCollection
A collection of KnotLinks to track how spline knots are linked and the utilities to update these links when splines are modified.
Spline
The Spline class is a collection of BezierKnot, the closed/open state, and editing representation.
SplineAnimate
A component for animating an object along a Spline.
SplineComponent
Base class for SplineInstantiate and SplineExtrude, contains common elements to both of these Components
SplineContainer
A Component that holds a Spline object.
SplineData<T>
The SplineData{T} class is used to store information relative to a Spline without coupling data directly to the Spline class. SplineData can store any type of data, and provides options for how to index DataPoints.
SplineExtrude
A component for creating a tube mesh from a Spline at runtime.
SplineFactory
Methods to create spline shapes.
SplineInstantiate
SplineInstantiate is used to automatically instantiate prefabs or objects along a spline.
SplineJobs
The SplineJobs class contains utility methods for evaluating spline data using the Jobs system.
SplineMesh
Utility methods for creating and working with meshes.
SplineUtility
A collection of methods for extracting information about Spline types.
Structs
BezierCurve
Control points for a cubic bezier curve.
Points P0 through P3 are in sequential order, describing the starting point, second, third, and ending controls for a cubic bezier curve.
BezierKnot
This struct contains position and tangent data for a knot. The Spline class stores a collection of BezierKnot that form a series of connected BezierCurve. Each knot contains a Position, Tangent In, and Tangent Out. When a Spline is not closed, the first and last knots will contain an extraneous tangent (in and out, respectively).
DataPoint<TDataType>
A pair containing an interpolation ratio and {TDataType} value.
DistanceToInterpolation
A key-value pair associating a distance to interpolation ratio ('t') value. This is used when evaluating Spline attributes to ensure uniform ditribution of sampling points.
GetPosition
Provides methods to calculate, in parallel, the positions along NativeSpline.
GetPositionTangentNormal
A job struct for calculating in parallel the position, tangent, and normal (up) vectors along a NativeSpline.
NativeSpline
A read-only representation of Spline that is optimized for efficient access and queries. NativeSpline can be constructed with a Spline and Transform. If a transform is applied, all values will be relative to the transformed knot positions.
SplineComputeBufferScope<T>
SplineComputeBufferScope is a convenient way to extract from a spline the information necessary to evaluate spline values in a ComputeShader. To access Spline evaluation methods in a shader, include the "Splines.cginc" file:
#include "Packages/com.unity.splines/Shader/Spline.cginc"
SplineInstantiate.InstantiableItem
Describe the item prefab to instantiate and associate it with a probability
SplineKnotIndex
Provides a tuple to define a couple (Spline index, Knot index) that identifies a particular knot on a spline. This tuple is used by KnotLinkCollection to maintain links between knots.
Interfaces
IDataPoint
Defines an interpolation ratio 't' for a Data Point.
IInterpolator<T>
To calculate a value at some distance along a spline, interpolation is required. The IInterpolator interface allows you to define how data is interpreted given a start value, end value, and normalized interpolation value (commonly referred to as 't').
ISpline
ISpline defines the interface from which Spline types inherit.
ISplineContainer
An interface that represents ISplineContainer on a MonoBehaviour to enable Spline tools in the Editor.
SplineMesh.ISplineVertexData
Interface for Spline mesh vertex data. Implement this interface if you are extruding custom mesh data and do not want to use the vertex layout provided by SplineMesh."/>.
Enums
BezierTangent
Describes the direction of a BezierKnot tangent. A spline is composed of a list of BezierKnot, where every knot can be either the start or end of a BezierCurve. The BezierTangent enum indicates which tangent should be used to construct a curve.
PathIndexUnit
Describes the unit of measurement used by DataPoint<TDataType>.
SplineAnimate.AlignmentMode
Describes the ways the object can be aligned when animating along the Spline.
SplineAnimate.EasingMode
Describes the different ways the object's animation along the Spline can be eased.
SplineAnimate.LoopMode
Describes the different ways the object's animation along the Spline can be looped.
SplineAnimate.Method
Describes the different methods that may be used to animated the object along the Spline.
SplineComponent.AlignAxis
Describes the different types of object alignment axes.
SplineInstantiate.Method
Describe the possible methods to instantiate instances along the spline.
SplineInstantiate.OffsetSpace
The space in which to interpret the offset, this can be different from the orientation space used to instantiate objects.
SplineInstantiate.Space
Describes the coordinate space that is used to orient the instantiated object.
SplineModification
Describes the different types of changes that can occur to a spline.
TangentMode
Describes the different ways a tool might interact with a tangent handle.