# IsLinkOccupied(NavMeshLinkInstance)

> Determines whether or not a NavMesh agent is currently using this link.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.AI](/engine/6000.7/script-reference/unityengine/ai.md)
* **Assembly:** UnityEngine.AIModule

```csharp
public static bool IsLinkOccupied(NavMeshLinkInstance handle)
```

### Parameters

**** (\[NavMeshLinkInstance]\(/engine/6000.7/script-reference/unityengine/ai/navmeshlinkinstance)): The link instance whose state to query.

### Returns

| Type                                                          | Description                                                         |
| ------------------------------------------------------------- | ------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if an agent is currently traversing the link, otherwise false. |

### Remarks

Use this method to determine if your NavMesh agent can move onto the specified NavMesh link instance. Only one NavMesh agent can traverse a NavMesh link instance at any one time, so your agent can't move onto a NavMesh link instance that is already occupied. A NavMesh link instance is occupied when any NavMesh agent moves onto the link as part of the path the agent has calculated to the [destination](/engine/6000.7/script-reference/unityengine/ai/navmeshagent/destination.md). When the agent moves off of the link, either automatically or through a call to [NavMeshAgent.CompleteOffMeshLink](/engine/6000.7/script-reference/unityengine/ai/navmeshagent/completeoffmeshlink.md), the link instance is no longer occupied.

This method is available as of 2023.2.

Additional Resources: [\_isOnOffMeshLink](/engine/6000.7/script-reference/unityengine/ai/navmeshagent/isonoffmeshlink.md)
