Description
The DrawMesh
property of the NavMesh
class in the Sandbox.Navigation
namespace is a boolean property that determines whether the navigation mesh should be drawn in the editor. This property is useful for visualizing the navigation mesh during development, allowing developers to see how the mesh is generated and how it interacts with the environment.
Usage
To use the DrawMesh
property, you can simply get or set its value on an instance of the NavMesh
class. Setting this property to true
will enable the drawing of the navigation mesh in the editor, while setting it to false
will disable it.
Example
// Example of using the DrawMesh property
// Assuming navMesh is an instance of NavMesh
NavMesh navMesh = new NavMesh();
// Enable drawing of the navigation mesh in the editor
navMesh.DrawMesh = true;
// Check if the navigation mesh is set to be drawn
bool isDrawingEnabled = navMesh.DrawMesh;
// Output: true
// This indicates that the navigation mesh will be drawn in the editor