docs.unity3d.com
    Show / Hide Table of Contents

    Class SplineToolContext

    Defines a tool context for editing splines. When authoring tools for splines, pass the SplineToolContext type to the EditorToolAttribute.editorToolContext parameter to register as a spline tool.

    Inheritance
    Object
    SplineToolContext
    Namespace: UnityEditor.Splines
    Syntax
    public sealed class SplineToolContext : EditorToolContext

    Methods

    GetEditorToolType(Tool)

    Returns the matching EditorTool type for the specified Tool given the context.

    Declaration
    protected override Type GetEditorToolType(Tool tool)
    Parameters
    Type Name Description
    Tool tool

    The Tool to resolve to an EditorTool type.

    Returns
    Type Description
    Type

    An EditorTool type for the requested Tool.

    OnActivated()

    Invoked after this EditorToolContext becomes the active tool context.

    Declaration
    public override void OnActivated()

    OnToolGUI(EditorWindow)

    Invoked for each window where this context is active. The spline context uses this method to implement common functionality for working with splines, ex gizmo drawing and selection.

    Declaration
    public override void OnToolGUI(EditorWindow window)
    Parameters
    Type Name Description
    EditorWindow window

    OnWillBeDeactivated()

    Invoked before this EditorToolContext stops being the active tool context.

    Declaration
    public override void OnWillBeDeactivated()
    Back to top
    Terms of use
    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