Description
The IsGenerating
property indicates whether the navigation mesh is currently in the process of being generated. This property is useful for checking the status of the navigation mesh generation process, allowing you to determine if the mesh is actively being built or if it is idle.
Usage
To check if the navigation mesh is currently generating, you can access the IsGenerating
property of the NavMesh
class. This property returns a boolean value, where true
indicates that the mesh is being generated, and false
indicates that it is not.
Example
// Example of checking if the navigation mesh is generating
if (NavMesh.IsGenerating)
{
// The navigation mesh is currently being generated
// You might want to wait or perform other actions
}
else
{
// The navigation mesh is not generating
// Safe to proceed with operations that require a complete nav mesh
}