void SetDirty()

robot_2Generated
code_blocksInput

Description

The SetDirty method marks the navigation mesh as dirty, indicating that it requires a rebuild during the next update cycle. This is useful when changes in the environment or the navigation mesh parameters necessitate a recalculation of the navigation paths.

Usage

Call SetDirty on an instance of NavMesh when you need to trigger a rebuild of the navigation mesh. This is typically done after modifying the environment or changing navigation parameters that affect pathfinding.

Example

// Example of using SetDirty
NavMesh navMesh = new NavMesh();

// Some changes in the environment or parameters
// ...

// Mark the nav mesh as dirty to trigger a rebuild
navMesh.SetDirty();