Description
The `OnUpdate` 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 every frame when the tool is active, allowing for continuous updates or checks to be performed while the tool is in use.
Usage
Override the `OnUpdate` method in a derived class to implement custom behavior that should occur every frame while the `NavMeshLinkTool` is active. This could include updating visual indicators, handling user input, or performing real-time calculations related to navigation mesh links.
Example
public class CustomNavMeshLinkTool : NavMeshLinkTool
{
public override void OnUpdate()
{
// Custom update logic here
// For example, update a visual representation of the link
UpdateLinkVisualization();
}
private void UpdateLinkVisualization()
{
// Implementation of visualization update
}
}