void OnDisabled()

book_4_sparkGenerated
code_blocksInput

Description

The `OnDisabled` 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 disabled, allowing for any necessary cleanup or state management to occur when the tool is no longer active.

Usage

Override the `OnDisabled` method in a derived class to implement custom behavior that should occur when the `NavMeshLinkTool` is disabled. This could include releasing resources, stopping any ongoing processes, or resetting states that were modified while the tool was active.

Example

public class CustomNavMeshLinkTool : NavMeshLinkTool
{
    public override void OnDisabled()
    {
        // Custom cleanup logic here
        // For example, reset any temporary data or states
        ResetTemporaryData();
    }

    private void ResetTemporaryData()
    {
        // Implementation of data reset
    }
}