Version: 2023.1

ToolManager

class in UnityEditor.EditorTools

切换到手册

描述

This class manipulates editor tools in the Scene view.

静态变量

activeContextTypeGets the type of EditorToolContext that is currently active. The default value is GameObjectToolContext.
activeToolTypeGets the type of the EditorTool that is currently active.

静态函数

IsActiveContextTest if an EditorToolContext is currently the active tool context.
IsActiveTool测试 EditorTool 当前是否是激活的工具。
RefreshAvailableToolsCall RefreshAvailableTools to rebuild the contents of the Scene View Tools Overlay.
RestorePreviousPersistentTool将上次使用的全局 EditorTool 设置为激活的工具。
RestorePreviousTool将上次使用的 EditorTool 设置为激活的工具。
SetActiveContextSets the active EditorToolContext.
SetActiveTool设置激活的 EditorTool。

Events

activeContextChangedDefines an event handler for when the active EditorToolContext changes.
activeContextChangingDefines an event handler for when the active EditorToolContext will change.
activeToolChangedDefines an event handler for when the active tool changes.
activeToolChangingDefines an event handler for when the active tool changes.