Description
The CurrentTool
property of the EditorToolManager
class provides access to the currently active editor tool within the editor environment. This property is an instance of the EditorTool
class and represents the tool that is currently selected and in use by the user.
Usage
To access the current tool being used in the editor, you can simply get the value of the CurrentTool
property. This can be useful for determining the current state of the editor or for performing operations based on the active tool.
Example usage:
EditorTool activeTool = EditorToolManager.CurrentTool;
if (activeTool != null)
{
// Perform operations with the active tool
Console.WriteLine($"The current tool is: {activeTool.Name}");
}
else
{
Console.WriteLine("No tool is currently active.");
}
Example
EditorTool activeTool = EditorToolManager.CurrentTool;
if (activeTool != null)
{
// Perform operations with the active tool
Console.WriteLine($"The current tool is: {activeTool.Name}");
}
else
{
Console.WriteLine("No tool is currently active.");
}