docs.unity3d.com
    Show / Hide Table of Contents

    Class SplineDataHandles

    Provides default handles to SplineData. Call DataPointHandles<TSpline, TData>(TSpline, SplineData<TData>, Boolean) in your Editor Tool to add default handles for you to add, move, and remove SplineData's DataPoints along a spline.

    Inheritance
    Object
    SplineDataHandles
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.Splines
    Syntax
    public static class SplineDataHandles

    Methods

    DataPointHandles<TSpline, TData>(TSpline, SplineData<TData>, Boolean)

    Creates manipulation handles in the SceneView to add, move, and remove SplineData's DataPoints along a spline. DataPoints of the targeted SplineData along a Spline. Left click on an empty location on the spline adds a new DataPoint in the SplineData. Left click on an existing DataPoint allows to move this point along the Spline while a right click on it allows to delete that DataPoint.

    Declaration
    public static void DataPointHandles<TSpline, TData>(this TSpline spline, SplineData<TData> splineData, bool useDefaultValueOnAdd = false)
        where TSpline : ISpline
    Parameters
    Type Name Description
    TSpline spline

    The Spline to use to interprete the SplineData.

    SplineData<TData> splineData

    The SplineData for which the handles are drawn.

    Boolean useDefaultValueOnAdd

    Either to use default value or closer DataPoint value when adding new DataPoint.

    Type Parameters
    Name Description
    TSpline

    The Spline type.

    TData

    The type of data this data point stores.

    DataPointHandles<TSpline, TData>(TSpline, SplineData<TData>, Boolean, Int32)

    Creates manipulation handles in the Scene view that can be used to add, move, and remove SplineData's DataPoints along a spline.

    Declaration
    public static void DataPointHandles<TSpline, TData>(this TSpline spline, SplineData<TData> splineData, bool useDefaultValueOnAdd, int splineID = 0)
        where TSpline : ISpline
    Parameters
    Type Name Description
    TSpline spline

    The spline to use to interprete the SplineData.

    SplineData<TData> splineData

    The SplineData for which the handles are drawn.

    Boolean useDefaultValueOnAdd

    Whether to use the default value or a closer DataPoint value when adding new DataPoint.

    Int32 splineID

    The ID for the spline.

    Type Parameters
    Name Description
    TSpline

    The spline type.

    TData

    The type of data this data point stores.

    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