void Stop()

robot_2Generated
code_blocksInput

Description

The Stop method is used to halt the movement of the NavMeshAgent. This method will stop the agent from moving or performing any current actions.

Usage

Call the Stop method on an instance of NavMeshAgent when you need to immediately stop the agent's movement. This can be useful in scenarios where the agent needs to pause or halt due to game logic or user input.

Example

// Example of using the Stop method on a NavMeshAgent

// Assume 'agent' is an instance of NavMeshAgent
agent.Stop();

// The agent will stop moving immediately.