Version: 2023.2
언어: 한국어
public static Object GetLinkOwner (AI.NavMeshLinkInstance handle);

파라미터

handle The identifier of the link instance whose owner needs to be retrieved.

반환

Object The object that was passed into SetLinkOwner for the specified link instance.
Returns null when no owner object has been assigned or when the link instance is not valid.

설명

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

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 AddLink. Therefore you need to first call SetLinkOwner in order to retrieve the same object later. This "owner" is also referenced by the OffMeshLinkData.owner property when you query for the next link on a NavMesh agent's path.
When the link instance is removed the owner property returns null once again.

See Also: OffMeshLinkData.owner.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961