Struct SplineInfo
SplineInfo is used to wrap a reference to the SplineContainer and index within that container to describe a Spline.
Inherited Members
Namespace: UnityEngine.Splines
Syntax
[Serializable]
public struct SplineInfo : IEquatable<SplineInfo>, ISerializationCallbackReceiver
Constructors
SplineInfo(ISplineContainer, Int32)
Create a new SplineInfo object.
Declaration
public SplineInfo(ISplineContainer container, int index)
Parameters
Type | Name | Description |
---|---|---|
ISplineContainer | container | The ISplineContainer that contains the spline. |
Int32 | index | The index of the spline in the enumerable returned by the ISplineContainer. |
Properties
Container
The ISplineContainer that contains the spline.
Declaration
public ISplineContainer Container { get; set; }
Property Value
Type | Description |
---|---|
ISplineContainer |
Index
The index of the spline in the enumerable returned by the ISplineContainer.
Declaration
public int Index { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
LocalToWorld
Matrix that transforms the Object from local space into world space.
Declaration
public readonly float4x4 LocalToWorld { get; }
Property Value
Type | Description |
---|---|
float4x4 |
Object
If the referenced ISplineContainer is a UnityEngine.Object this field contains that object.
Declaration
public readonly Object Object { get; }
Property Value
Type | Description |
---|---|
Object |
Spline
A reference to the Spline. This may be null if the container or index are invalid.
Declaration
public readonly Spline Spline { get; }
Property Value
Type | Description |
---|---|
Spline |
Transform
The associated Transform of the target. This may be null if the container is not a MonoBehaviour.
Declaration
public readonly Transform Transform { get; }
Property Value
Type | Description |
---|---|
Transform |
Methods
Equals(Object)
Compare against an object for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare against. |
Returns
Type | Description |
---|---|
Boolean | Returns true when |
Overrides
Equals(SplineInfo)
Compare against another SplineInfo for equality.
Declaration
public bool Equals(SplineInfo other)
Parameters
Type | Name | Description |
---|---|---|
SplineInfo | other | The other instance to compare against. |
Returns
Type | Description |
---|---|
Boolean | Returns true when |
Implements
GetHashCode()
Calculate a hash code for this info.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for the SplineInfo. |
Overrides
OnAfterDeserialize()
Called after this object is deserialized by the Editor.
Declaration
public void OnAfterDeserialize()
Implements
OnBeforeSerialize()
Called before this object is serialized by the Editor.
Declaration
public void OnBeforeSerialize()