docs.unity3d.com
    Show / Hide Table of Contents

    Struct SplineInfo

    SplineInfo is used to wrap a reference to the SplineContainer and index within that container to describe a Spline.

    Inherited Members
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    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 obj is a SplineInfo and the values of each instance are identical.

    Overrides
    ValueType.Equals(Object)

    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 other is a SplineInfo and the values of each instance are identical.

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Calculate a hash code for this info.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for the SplineInfo.

    Overrides
    ValueType.GetHashCode()

    OnAfterDeserialize()

    Called after this object is deserialized by the Editor.

    Declaration
    public void OnAfterDeserialize()
    Implements
    ISerializationCallbackReceiver.OnAfterDeserialize()

    OnBeforeSerialize()

    Called before this object is serialized by the Editor.

    Declaration
    public void OnBeforeSerialize()
    Implements
    ISerializationCallbackReceiver.OnBeforeSerialize()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023