Version: 2023.2
Method group is Obsolete
Experimental: this API is experimental and might be changed or removed in the future.

NavMeshQuery

struct in UnityEngine.Experimental.AI

切换到手册
Obsolete

描述

用于在 NavMeshWorld 中执行导航操作的对象。

NavMesh 相关结构中的操作相反,可以在作业(IJobIJobParallelFor)内执行 NavMeshQuery 操作。

To obtain a path between two locations on the NavMesh, you must create a NavMeshQuery with a pathNodePoolSize value in the range from 1 to 65,535. After creating a NavMeshQuery, you must call the following methods in this order: BeginFindPath, UpdateFindPath (can be repeated), EndFindPath, GetPathResult. These methods store state data within the NavMeshQuery. Other methods can be called in any order since they do not change state data.

在 Editor 中执行时,如果任何参数无效,则所有方法都会抛出异常。

**注意:**NavMeshQuery 的预期功能集还没有完全完成。