# GetLinkOwner(NavMeshLinkInstance)

> Gets the object, if any, that is associated with the link instance.

## Definition

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

```csharp
public static Object GetLinkOwner(NavMeshLinkInstance handle)
```

### Parameters

**** (\[NavMeshLinkInstance]\(/engine/6000.6/script-reference/unityengine/ai/navmeshlinkinstance)): The identifier of the link instance whose owner needs to be retrieved.

### Returns

| Type                                                            | Description                                                                                                                                                     |
| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Object](/engine/6000.6/script-reference/unityengine/object.md) | The object that was passed into [NavMesh.SetLinkOwner](/engine/6000.6/script-reference/unityengine/ai/navmesh/setlinkowner.md) for the specified link instance. |

### Remarks

Use this method to obtain a reference to the component that created the link, or more generally, to any object that contains useful information about this specific link that is active in the navigation system. We refer to that object as the "owner". The owner is null for any new link instance created with [NavMesh.AddLink](/engine/6000.6/script-reference/unityengine/ai/navmesh/addlink.md). Therefore you need to first call [NavMesh.SetLinkOwner](/engine/6000.6/script-reference/unityengine/ai/navmesh/setlinkowner.md) in order to retrieve the same object later. This "owner" is also referenced by the [\_owner](/engine/6000.6/script-reference/unityengine/ai/offmeshlinkdata/owner.md) property when you query for the next link on a NavMesh agent's path.

When the link instance is [removed](/engine/6000.6/script-reference/unityengine/ai/navmeshlinkinstance/remove.md) the owner property returns null once again.

Additional Resources: [\_owner](/engine/6000.6/script-reference/unityengine/ai/offmeshlinkdata/owner.md)
