Description
The OnDisabled
method is a virtual method in the Editor.MeshEditor.BlockTool
class. It is called when the Block Tool is disabled within the editor environment. This method can be overridden in derived classes to provide custom behavior when the tool is no longer active.
Usage
Override the OnDisabled
method in a subclass of BlockTool
to implement custom logic that should execute when the tool is disabled. This could include cleaning up resources, resetting states, or other necessary operations to ensure the tool is properly deactivated.
Example
public class CustomBlockTool : BlockTool
{
public override void OnDisabled()
{
// Custom logic to execute when the tool is disabled
// For example, reset temporary data or clear selections
base.OnDisabled(); // Call base method if needed
}
}