void OnEnabled()

book_4_sparkGenerated
code_blocksInput

Description

The OnEnabled method is a virtual method in the Editor.MeshEditor.BlockTool class. It is called when the Block Tool is enabled within the editor environment. This method is part of the lifecycle of the tool and is typically used to initialize or reset any necessary states or resources when the tool becomes active.

Usage

Override the OnEnabled method in a derived class to implement custom behavior that should occur when the Block Tool is enabled. This could include setting up UI elements, initializing data structures, or preparing the tool for user interaction.

Example

public class CustomBlockTool : Editor.MeshEditor.BlockTool
{
    public override void OnEnabled()
    {
        // Custom initialization code here
        // For example, setting up a custom UI or logging tool activation
    }
}