Namespace UnityEngine.Splines
Classes
CurveUtility
A collection of methods for extracting information about BezierCurve types.
EmbeddedSplineData
Wrapper for accessing a SplineData<T> value stored on Spline through one of the embedded key value collections. It is not required to use this class to access embedded SplineData<T>, however it does provide some convenient functionality for working with this data in the Inspector.
EmbeddedSplineDataFieldsAttribute
Attribute used to make an EmbeddedSplineData variable show in the Inspector with a filtered set of fields editable. Use this in situations where you want to specify EmbeddedSplineData parameters in code and not allow them to be modified in the Inspector. to a ISplineContainer.
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 to animate 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.
SplineIndexAttribute
Attribute used to make an integer variable show in the Inspector as a popup menu with spline choices relative to a ISplineContainer.
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.
SplineMath
Assorted utility functions for math equations commonly used when working with Splines.
SplineMesh
Utility methods for creating and working with meshes.
SplinePath
The SplinePath type is an implementation of ISpline that is composed of multiple sections of other splines (see SplineSlice<T>). This is useful when you want to evaluate a path that follows multiple splines, typically in the case where splines share linked knots.
SplinePath<T>
The SplinePath type is an implementation of ISpline that is composed of multiple sections of other splines (see SplineSlice<T>). This is useful when you want to evaluate a path that follows multiple splines, typically in the case where splines share linked knots.
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 position is a scalar point and the tangents are vectors. 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 distribution 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"
SplineInfo
SplineInfo is used to wrap a reference to the SplineContainer and index within that container to describe a Spline.
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.
SplineRange
Describes a subset of knot indices in a Spline. The range might iterate in either the forward or backward direction.
SplineRange.SplineRangeEnumerator
A struct for iterating a SplineRange.
SplineSlice<T>
SplineSlice represents a partial or complete range of curves from another Spline. A SplineSlice<T> by itself does not store any BezierKnots. It stores a reference to a separate Spline, then retrieves knots by iterating the SplineRange. Use SplineSlice<T> in conjunction with SplinePath to create seamless paths from discrete Spline segments.
Interfaces
IDataPoint
Defines an interpolation ratio 't' for a Data Point.
IHasEmptyCurves
This interface defines a collection of knot indices that should be considered disconnected from the following knot indices when creating a BezierCurve.
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.
EmbeddedSplineDataField
Describes the fields on an EmbeddedSplineData type.
EmbeddedSplineDataType
Describes a type of data stored by a SplineData<T> collection embedded in Spline.
PathIndexUnit
Describes the unit of measurement used by DataPoint<TDataType>.
SliceDirection
Describes the direction that a SplineRange interpolates. Use SplineSlice<T> and SplineRange to create paths that interpolate along a Spline in either a forward or backward direction.
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 can be used to animated an object along a 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.