# SetLinkOwner(NavMeshLinkInstance, Object)

> Associates an object with the instance of a link.

## Definition

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

```csharp
public static void SetLinkOwner(NavMeshLinkInstance handle, Object owner)
```

### Parameters

**** (\[NavMeshLinkInstance]\(/engine/6000.7/script-reference/unityengine/ai/navmeshlinkinstance)): The identifier of the link instance for which you assign an owner.**** (\[Object]\(/engine/6000.7/script-reference/unityengine/object)): An object that carries useful information in relation to the instance of the link.

### Remarks

Call [NavMesh.GetLinkOwner](/engine/6000.7/script-reference/unityengine/ai/navmesh/getlinkowner.md) to retrieve a reference to the assigned object. The [\_owner](/engine/6000.7/script-reference/unityengine/ai/offmeshlinkdata/owner.md) property obtained from the path of an agent also points to the object that has been assigned to the link.

If the instance of the link is not valid, setting the owner has no effect and getting it returns null.

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