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.
Inherited Members
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
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)
Namespace: UnityEditor.Splines
Syntax
[EditorToolContext("Spline", typeof(ISplineContainer))]
public sealed class SplineToolContext : EditorToolContext, IEditor
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. |
Overrides
OnActivated()
Invoked after this EditorToolContext becomes the active tool context.
Declaration
public override void OnActivated()
Overrides
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 |
Overrides
OnWillBeDeactivated()
Invoked before this EditorToolContext stops being the active tool context.
Declaration
public override void OnWillBeDeactivated()