docs.unity3d.com
    Show / Hide Table of Contents

    Class SplineContainer

    A Component that holds a Spline object.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    SplineContainer
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    UnityEngine.Component.GetComponentInParent(System.Type, System.Boolean)
    Component.GetComponentInParent(Type)
    UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.Splines
    Syntax
    public sealed class SplineContainer : MonoBehaviour, ISplineProvider

    Properties

    Spline

    The instantiated Spline object attached to this component.

    Declaration
    public Spline Spline { get; set; }
    Property Value
    Type Description
    Spline

    Methods

    CalculateCurveLength(Int32)

    Calculate the length of a BezierCurve in world space.

    Declaration
    public float CalculateCurveLength(int curveIndex)
    Parameters
    Type Name Description
    Int32 curveIndex

    The index of the curve to fetch length for.

    Returns
    Type Description
    Single

    The length of a BezierCurve in world space.

    CalculateSplineLength()

    Calculate the length of Spline in world space.

    Declaration
    public float CalculateSplineLength()
    Returns
    Type Description
    Single

    The length of Spline in world space

    EvaluateCurvePosition(Int32, Single)

    Evaluate the position on a curve at a specific t in world space. Use SplineToCurveInterpolation<T>(T, Single, out Single) to convert a time value from spline to curve space.

    Declaration
    public float3 EvaluateCurvePosition(int curveIndex, float t)
    Parameters
    Type Name Description
    Int32 curveIndex

    The index of the BezierCurve to evaluate.

    Single t

    A value between 0 and 1 representing a percentage of the curve.

    Returns
    Type Description
    float3

    A position in world space.

    EvaluateCurveTangent(Int32, Single)

    Evaluate a tangent vector on a curve at a specific t in world space. Use SplineToCurveInterpolation<T>(T, Single, out Single) to convert a time value from spline to curve space.

    Declaration
    public float3 EvaluateCurveTangent(int curveIndex, float t)
    Parameters
    Type Name Description
    Int32 curveIndex

    The index of the BezierCurve to evaluate.

    Single t

    A value between 0 and 1 representing a percentage of the curve.

    Returns
    Type Description
    float3

    A tangent vector in world space.

    EvaluateSplinePosition(Single)

    Evaluate a tangent vector on a curve at a specific t in world space.

    Declaration
    public float3 EvaluateSplinePosition(float t)
    Parameters
    Type Name Description
    Single t

    A value between 0 and 1 representing a percentage of the curve.

    Returns
    Type Description
    float3

    A tangent vector.

    EvaluateSplineTangent(Single)

    Evaluate a tangent vector at a specific t in world space.

    Declaration
    public float3 EvaluateSplineTangent(float t)
    Parameters
    Type Name Description
    Single t

    A value between 0 and 1 representing a percentage of entire spline

    Returns
    Type Description
    float3

    A tangent vector

    EvaluateSplineUpVector(Single)

    Evaluate an up vector at a specific t

    Declaration
    public float3 EvaluateSplineUpVector(float t)
    Parameters
    Type Name Description
    Single t

    A value between 0 and 1 representing a percentage of entire spline

    Returns
    Type Description
    float3

    An up vector

    Explicit Interface Implementations

    ISplineProvider.Splines

    Declaration
    IEnumerable<Spline> ISplineProvider.Splines { get; }
    Returns
    Type Description
    IEnumerable<Spline>
    Implements
    ISplineProvider.Splines
    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