void OnSelectionChanged()

book_4_sparkGenerated
code_blocksInput

Description

The OnSelectionChanged method is a virtual method in the BlockTool class, part of the Editor.MeshEditor namespace. This method is called whenever the selection changes within the mesh editor. It allows for custom behavior to be implemented when the selection of mesh elements is modified.

Usage

Override this method in a derived class to implement custom logic that should occur when the selection changes. This could include updating UI elements, recalculating properties, or triggering other editor-specific actions.

Example

public class CustomBlockTool : BlockTool
{
    public override void OnSelectionChanged()
    {
        // Custom logic for when the selection changes
        // For example, update a status bar or log the selection change
        UpdateStatusBar();
    }

    private void UpdateStatusBar()
    {
        // Implementation for updating the status bar
    }
}