Description
The ComponentTools
property of the EditorToolManager
class provides access to a list of editor tools that are associated with components. This property is useful for managing and interacting with various tools that can be applied to 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 returns a List<EditorTool>
, allowing you to iterate over the tools, add new tools, or remove existing ones as needed.
Example usage:
EditorToolManager toolManager = new EditorToolManager();
List<EditorTool> tools = toolManager.ComponentTools;
// Iterate over the tools
foreach (var tool in tools)
{
// Perform operations with each tool
}
// Add a new tool
EditorTool newTool = new EditorTool();
tools.Add(newTool);
// Remove a tool
if (tools.Contains(newTool))
{
tools.Remove(newTool);
}
Example
EditorToolManager toolManager = new EditorToolManager();
List<EditorTool> tools = toolManager.ComponentTools;
// Iterate over the tools
foreach (var tool in tools)
{
// Perform operations with each tool
}
// Add a new tool
EditorTool newTool = new EditorTool();
tools.Add(newTool);
// Remove a tool
if (tools.Contains(newTool))
{
tools.Remove(newTool);
}