Version: 2023.2
LanguageEnglish
  • C#

NavMesh.SetLinkOwner

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void SetLinkOwner(AI.NavMeshLinkInstance handle, Object owner);

Parameters

handle The identifier of the link instance for which you assign an owner.
owner An object that carries useful information in relation to the instance of the link.

Description

Associates an object with the instance of a link.

Call GetLinkOwner to retrieve a reference to the assigned object. The OffMeshLinkData.owner 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: OffMeshLinkData.owner.