# DrawBuildDebug(NavMeshData, NavMeshBuildDebugFlags)

> Displays in the Editor the precise intermediate data used during the build process of the specified NavMesh.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.AI](/engine/6000.6/script-reference/unityeditor/ai.md)
* **Assembly:** UnityEditor.AIModule

```csharp
public static void DrawBuildDebug(NavMeshData navMeshData, NavMeshBuildDebugFlags flags)
```

### Parameters

**** (\[NavMeshData]\(/engine/6000.6/script-reference/unityengine/ai/navmeshdata)): NavMesh object for which debug data has been deliberately collected during the build process.**** (\[NavMeshBuildDebugFlags]\(/engine/6000.6/script-reference/unityengine/ai/navmeshbuilddebugflags)): Bitmask that designates the types of data to show at one time.

### Remarks

Additional Resources: [NavMeshBuildSettings.debug](/engine/6000.6/script-reference/unityengine/ai/navmeshbuildsettings/debug.md).

### Examples

```csharp
using System.Collections.Generic;
using UnityEditor.AI;
using UnityEngine;
using UnityEngine.AI;

public class NavMeshBuildDebugDraw : MonoBehaviour
{
    NavMeshData m_NavMeshData;

    void Start()
    {
        var bounds = new Bounds(transform.position, new Vector3(100.0f, 100.0f, 100.0f));
        var markups = new List<NavMeshBuildMarkup>();
        var sources = new List<NavMeshBuildSource>();
        NavMeshEditorHelpers.CollectSourcesInStage(
            bounds, ~0, NavMeshCollectGeometry.RenderMeshes, 0, markups, gameObject.scene, sources);

        var settings = NavMesh.GetSettingsByID(0);
        var debug = new NavMeshBuildDebugSettings();
        debug.flags = NavMeshBuildDebugFlags.All;
        settings.debug = debug;

        m_NavMeshData = new NavMeshData();
        UnityEngine.AI.NavMeshBuilder.UpdateNavMeshDataAsync(m_NavMeshData, settings, sources, bounds);
    }

    void OnDrawGizmos()
    {
        NavMeshEditorHelpers.DrawBuildDebug(
            m_NavMeshData, NavMeshBuildDebugFlags.Regions | NavMeshBuildDebugFlags.SimplifiedContours);
    }
}
```
