The LinkExit
property is an event that is triggered when the NavMeshAgent
exits a link. This event can be used to execute custom logic or actions when the agent completes traversing a link in the navigation mesh.
The LinkExit
property is an event that is triggered when the NavMeshAgent
exits a link. This event can be used to execute custom logic or actions when the agent completes traversing a link in the navigation mesh.
To use the LinkExit
event, you can subscribe to it with a method that matches the System.Action
delegate signature. This method will be called whenever the agent exits a link.
// Example of subscribing to the LinkExit event NavMeshAgent agent = new NavMeshAgent(); // Define a method to handle the event void OnLinkExit() { // Custom logic to execute when the agent exits a link Log.Info("Agent has exited a link."); } // Subscribe to the LinkExit event agent.LinkExit += OnLinkExit;