Class 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.
Inherited Members
Namespace: UnityEngine.Splines
Assembly: solution.dll
Syntax
[Serializable]
public class EmbeddedSplineData
Constructors
| Name | Description |
|---|---|
| EmbeddedSplineData() | Create a new EmbeddedSplineData instance with no parameters. |
| EmbeddedSplineData(string, EmbeddedSplineDataType, SplineContainer, int) | Create a new EmbeddedSplineData with parameters. |
Properties
| Name | Description |
|---|---|
| Container | The SplineContainer that holds the Spline. |
| Key | A unique string value used to identify and access a SplineData<T> collection stored in a Spline. |
| SplineIndex | The index of the Spline on the SplineContainer. |
| Type | The type of data stored by the SplineData<T> collection. Embedded SplineData<T> is restricted to a pre-defined set of primitive types. |
Methods
| Name | Description |
|---|---|
| GetOrCreateFloat4Data() | Returns a SplineData<T> for Key and Type. If an instance matching the key and type does not exist, a new entry is appended to the internal collection and returned. Note that this is a reference to the stored SplineData<T>, not a copy. Any modifications to this collection will affect the Spline data. |
| GetOrCreateFloatData() | Returns a SplineData<T> for Key and Type. If an instance matching the key and type does not exist, a new entry is appended to the internal collection and returned. Note that this is a reference to the stored SplineData<T>, not a copy. Any modifications to this collection will affect the Spline data. |
| GetOrCreateIntData() | Returns a SplineData<T> for Key and Type. If an instance matching the key and type does not exist, a new entry is appended to the internal collection and returned. Note that this is a reference to the stored SplineData<T>, not a copy. Any modifications to this collection will affect the Spline data. |
| GetOrCreateObjectData() | Returns a SplineData<T> for Key and Type. If an instance matching the key and type does not exist, a new entry is appended to the internal collection and returned. Note that this is a reference to the stored SplineData<T>, not a copy. Any modifications to this collection will affect the Spline data. |
| TryGetFloat4Data(out SplineData<float4>) | Attempt to get a reference to the SplineData<T> described by this object. |
| TryGetFloatData(out SplineData<float>) | Attempt to get a reference to the SplineData<T> described by this object. |
| TryGetIntData(out SplineData<int>) | Attempt to get a reference to the SplineData<T> described by this object. |
| TryGetObjectData(out SplineData<Object>) | Attempt to get a reference to the SplineData<T> described by this object. |
| TryGetSpline(out Spline) | Attempt to get a reference to the Spline described by this object. |