docs.unity3d.com
Search Results for

    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.

    Implements
    IEquatable<SplineInfo>
    ISerializationCallbackReceiver
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Splines
    Assembly: Unity.Splines.dll
    Syntax
    [Serializable]
    public struct SplineInfo : IEquatable<SplineInfo>, ISerializationCallbackReceiver

    Constructors

    SplineInfo(ISplineContainer, int)

    Create a new SplineInfo object.

    Declaration
    public SplineInfo(ISplineContainer container, int index)
    Parameters
    Type Name Description
    ISplineContainer container

    The ISplineContainer that contains the spline.

    int 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
    int

    LocalToWorld

    Matrix that transforms the Object from local space into world space.

    Declaration
    public float4x4 LocalToWorld { get; }
    Property Value
    Type Description
    float4x4

    Object

    If the referenced ISplineContainer is a UnityEngine.Object this field contains that object.

    Declaration
    public 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 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 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
    bool

    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
    bool

    Returns true when other is a SplineInfo and the values of each instance are identical.

    GetHashCode()

    Calculate a hash code for this info.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the SplineInfo.

    Overrides
    ValueType.GetHashCode()

    OnAfterDeserialize()

    Called after this object is deserialized by the Editor.

    Declaration
    public void OnAfterDeserialize()

    OnBeforeSerialize()

    Called before this object is serialized by the Editor.

    Declaration
    public void OnBeforeSerialize()

    Implements

    IEquatable<T>
    ISerializationCallbackReceiver
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)