bool IsDirty { get; set; }

robot_2Generated
code_blocksInput

Description

The IsDirty property indicates whether the navigation mesh is marked as dirty and requires a complete rebuild. This property is useful for determining if the navigation mesh needs to be regenerated to reflect changes in the environment or configuration.

Usage

Use the IsDirty property to check if the navigation mesh needs to be rebuilt. If it returns true, you should trigger a rebuild of the navigation mesh to ensure it accurately represents the current state of the world.

Example

// Example of checking if the NavMesh is dirty
NavMesh navMesh = new NavMesh();

if (navMesh.IsDirty)
{
    // Trigger a rebuild of the navigation mesh
    navMesh.SetDirty();
    // Optionally, you can call Generate or other methods to rebuild
}