Description
The ComponentTools
property of the EditorToolManager
class provides access to a list of EditorTool
instances that are associated with components in the editor. This property allows you to retrieve and manipulate the tools that are specifically designed to interact with various components within the editor environment.
Usage
To use the ComponentTools
property, you can access it directly from an instance of the EditorToolManager
class. This property is not static, so you need to have an instance of EditorToolManager
to access it. Once accessed, you can iterate over the list to perform operations on each EditorTool
or modify the list as needed.
Example
// Assuming 'editorToolManager' is an instance of EditorToolManager
List<EditorTool> tools = editorToolManager.ComponentTools;
// Iterate over the tools
foreach (var tool in tools)
{
// Perform operations with each tool
tool.Activate();
}
// Add a new tool to the list
EditorTool newTool = new EditorTool();
tools.Add(newTool);