Version: 2023.1
Experimental: this API is experimental and might be changed or removed in the future.

NavMeshQuery.GetAgentTypeIdForPolygon

切换到手册
public int GetAgentTypeIdForPolygon (Experimental.AI.PolygonId polygon);

参数

polygon 来自导航网格表面或链接的节点的标识符。

返回

int 代理类型标识符。

描述

返回为导航网格烘焙的或已经配置链接的代理类型的标识符。

烘焙导航网格表面或配置链接之后,需要指定允许使用它们的**代理类型**。每种**代理类型**由唯一的整数标识。NavMeshQuery.MapLocationNavMesh.GetSettingsByIDNavMesh.GetSettingsNameFromIDNavMeshBuilder.BuildNavMeshDataNavMesh.CalculatePath 等操作都需要指定代理类型,以区分针对不同代理配置构建的导航网格。