# GetNavMeshLayer(GameObject)

> Get the navmesh layer for the GameObject.

## Definition

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

> **Warning:**
>
> **Deprecated.** GetNavMeshLayer 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().
>
> **Upgrade to** [GameObjectUtility.GetNavMeshArea](/engine/6000.0/script-reference/unityeditor/gameobjectutility/getnavmesharea.md)

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

### Parameters

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

### Returns

| Type                                                       | Description                                     |
| ---------------------------------------------------------- | ----------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The navmesh layer for the GameObject specified. |
