# GetNavMeshArea(GameObject)

> Get the navmesh area index for the GameObject.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

> **Warning:**
>
> **Deprecated.** GetNavMeshArea has been deprecated. To relate a GameObject to an area type and retrieve their relation later, create a NavMeshBuildMarkup and pass it into UnityEngine.AI.NavMeshBuilder.CollectSources().

```csharp
public static int GetNavMeshArea(GameObject go)
```

### Parameters

**** (\[GameObject]\(/engine/6000.0/script-reference/unityengine/gameobject)): The GameObject to query.

### Returns

| Type                                                       | Description         |
| ---------------------------------------------------------- | ------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | NavMesh area index. |
