void OnEnabled()

robot_2Generated
code_blocksInput

Description

The `OnEnabled` method is a virtual method in the `NavMeshLinkTool` class, which is part of the editor tools for managing navigation mesh links in a scene. This method is called when the tool is enabled, allowing for any necessary initialization or setup to be performed when the tool becomes active.

Usage

Override the `OnEnabled` method in a derived class to implement custom behavior that should occur when the `NavMeshLinkTool` is enabled. This could include setting up UI elements, initializing data structures, or preparing the scene for editing navigation mesh links.

Example

public class CustomNavMeshLinkTool : NavMeshLinkTool
{
    public override void OnEnabled()
    {
        // Custom initialization code here
        // For example, log a message or set up UI components
        Debug.Log("CustomNavMeshLinkTool has been enabled.");
    }
}