docs.unity.cn
    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 Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Monday, April 4, 2022
    Terms of use