Description
The CurrentModeName
property of the EditorToolManager
class holds the name of the current tool being used in the editor. This property is stored as a string, making it easy to store and restore the tool's state. It provides a single point of access to change or read the current tool's name. Note that the tool will not change until the next frame update, ensuring consistency during the current frame's operations.
Usage
To access the current tool's name, simply use the CurrentModeName
property. This is a static property, so it can be accessed directly from the EditorToolManager
class without needing an instance.
Example
// Example of accessing the CurrentModeName property
string currentToolName = EditorToolManager.CurrentModeName;
// Output the current tool name
// Note: Avoid using Console.WriteLine in s&box
// Instead, use appropriate logging or UI display methods
Log.Info($"Current Tool: {currentToolName}");