docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetLength

    GetLength()

    Return the sum of all curve lengths.

    Declaration
    public float GetLength()
    Returns
    Type Description
    float

    Returns the sum length of all curves composing this spline.

    Implements
    ISpline.GetLength()
    Remarks

    It is inefficient to call this method frequently, as it will calculate the length of all curves every time it is invoked. In cases where performance is critical, create a new Spline or NativeSpline instead. Note that you may pass a SplineSlice<T> to constructors for both Spline and NativeSpline.

    See Also
    GetCurveLength(int)
    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)