docs.unity.cn
    Show / Hide Table of Contents

    Class EditorSplineUtility

    Editor utility functions for working with Spline and SplineData<T>.

    Inheritance
    Object
    EditorSplineUtility
    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 EditorSplineUtility

    Properties

    DefaultTangentMode

    Represents the default TangentMode used to place or insert knots. If the user does not define tangent handles, then the tangent takes the default TangentMode.

    Declaration
    public static TangentMode DefaultTangentMode { get; }
    Property Value
    Type Description
    TangentMode

    Methods

    RegisterSplineDataChanged<T>(Action<SplineData<T>>)

    Use this function to register a callback that gets invoked once per-frame if any SplineData<T> changes occur.

    Declaration
    public static void RegisterSplineDataChanged<T>(Action<SplineData<T>> action)
    Parameters
    Type Name Description
    Action<SplineData<T>> action

    The callback to register.

    Type Parameters
    Name Description
    T

    The type parameter of SplineData<T>.

    SetKnotPlacementTool()

    Sets the current active context to the SplineToolContext and the current active tool to the Draw Splines Tool (UnityEditor.Splines.KnotPlacementTool)

    Declaration
    public static void SetKnotPlacementTool()

    UnregisterSplineDataChanged<T>(Action<SplineData<T>>)

    Use this function to unregister SplineData<T> change callback.

    Declaration
    public static void UnregisterSplineDataChanged<T>(Action<SplineData<T>> action)
    Parameters
    Type Name Description
    Action<SplineData<T>> action

    The callback to unregister.

    Type Parameters
    Name Description
    T

    The type parameter of SplineData<T>.

    Events

    AfterSplineWasModified

    Invoked once per-frame if a spline property has been modified.

    Declaration
    public static event Action<Spline> AfterSplineWasModified
    Event Type
    Type Description
    Action<Spline>
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Monday, October 24, 2022
    Terms of use