docs.unity3d.com
    Show / Hide Table of Contents

    Class SplineTool

    Base class from which all Spline tools inherit. Inherit SplineTool to author tools that behave like native spline tools. This class implements some common functionality and shortcuts specific to spline authoring.

    Inheritance
    Object
    Object
    ScriptableObject
    EditorTool
    SplineTool
    SplineMoveTool
    SplineRotateTool
    SplineScaleTool
    Inherited Members
    EditorTool.OnToolGUI(EditorWindow)
    EditorTool.IsAvailable()
    EditorTool.targets
    EditorTool.target
    EditorTool.toolbarIcon
    EditorTool.gridSnapEnabled
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    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.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    UnityEngine.Object.FindFirstObjectByType<T>()
    UnityEngine.Object.FindAnyObjectByType<T>()
    UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
    UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.Splines
    Syntax
    public abstract class SplineTool : EditorTool, IEditor

    Properties

    activeTool

    The current active SplineTool in use.

    Declaration
    protected static SplineTool activeTool { get; }
    Property Value
    Type Description
    SplineTool

    handleOrientation

    The current orientation of the handles for the current spline tool.

    Declaration
    public static HandleOrientation handleOrientation { get; set; }
    Property Value
    Type Description
    HandleOrientation

    handleRotation

    The current rotation of the handle regarding the selection and the Handle Rotation configuration.

    Declaration
    public static Quaternion handleRotation { get; }
    Property Value
    Type Description
    Quaternion

    pivotPosition

    The current position of the pivot regarding the selection.

    Declaration
    public static Vector3 pivotPosition { get; }
    Property Value
    Type Description
    Vector3

    Methods

    OnActivated()

    Invoked after this EditorTool becomes the active tool.

    Declaration
    public override void OnActivated()
    Overrides
    EditorTool.OnActivated()

    OnHandleOrientationChanged()

    Callback invoked when the handle rotation configuration changes.

    Declaration
    protected virtual void OnHandleOrientationChanged()

    OnPivotModeChanged()

    Callback invoked when the pivot mode configuration changes.

    Declaration
    protected virtual void OnPivotModeChanged()

    OnWillBeDeactivated()

    Invoked before this EditorTool stops being the active tool.

    Declaration
    public override void OnWillBeDeactivated()
    Overrides
    EditorTool.OnWillBeDeactivated()

    UpdateHandleRotation()

    Updates the current handle rotation. This is usually called internally by callbacks. UpdateHandleRotation can be called to refresh the handle rotation after manipulating spline elements, for instance, such as rotating a knot.

    Declaration
    public static void UpdateHandleRotation()

    UpdatePivotPosition(Boolean)

    Updates current pivot position, usually called internally by callbacks. It can be called to refresh the pivot position after manipulating spline elements, for instance, such as moving a knot.

    Declaration
    public static void UpdatePivotPosition(bool useKnotPositionForTangents = false)
    Parameters
    Type Name Description
    Boolean useKnotPositionForTangents

    Set to true to use the knots positions to compute the pivot instead of the tangents ones. This is necessary for some tools where it is preferrable to represent the handle on the knots rather than on the tangents directly. For instance, rotating a tangent is more intuitive when the handle is on the knot.

    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