Version: 2023.2

描述

为了方便起见,您可以直接从当前的几何形状创建一个构建源列表。(UnityEngine)

该集合可以根据层、几何形状类型以及通过按层级或体积收集来进行控制。


public static void CollectSources (Bounds includedWorldBounds, int includedLayerMask, AI.NavMeshCollectGeometry geometry, int defaultArea, List<NavMeshBuildMarkup> markups, List<NavMeshBuildSource> results);

参数

includedWorldBounds 查询的对象必须重叠这些边界才能包含在结果中。
includedLayerMask 指定哪些层包含在查询中。
geometry 要收集的几何形状类型 - 例如物理碰撞体。
defaultArea 分配给结果的区域类型,除非被 NavMeshMarkup 修改。
markups 允许更精确地控制对象收集方式的标记列表。
results 存储结果的列表,该列表会在调用开始时被清除。

描述

收集一个体积内的渲染器或物理碰撞体以及地形。(UnityEngine)


public static void CollectSources (Bounds includedWorldBounds, int includedLayerMask, AI.NavMeshCollectGeometry geometry, int defaultArea, bool generateLinksByDefault, List<NavMeshBuildMarkup> markups, bool includeOnlyMarkedObjects, List<NavMeshBuildSource> results);

参数

includedWorldBounds 查询的对象必须重叠这些边界才能包含在结果中。
includedLayerMask 指定哪些层包含在查询中。
geometry 要收集的几何形状类型 - 例如物理碰撞体。
defaultArea 分配给结果的区域类型,除非被 NavMeshMarkup 修改。
generateLinksByDefault If true, all the source will be considered for generating links. Otherwise, only the marked sources will be considered.
markups 允许更精确地控制对象收集方式的标记列表。
includeOnlyMarkedObjects Specifies if only objects with markups are collected.
results 存储结果的列表,该列表会在调用开始时被清除。

描述

收集一个体积内的渲染器或物理碰撞体以及地形。(UnityEngine)


public static void CollectSources (Transform root, int includedLayerMask, AI.NavMeshCollectGeometry geometry, int defaultArea, List<NavMeshBuildMarkup> markups, List<NavMeshBuildSource> results);

参数

root 如果不为 null,则仅考虑查询中的根及其子项;如果为 null,则包括加载的所有项。
includedLayerMask 指定哪些层包含在查询中。
geometry 要收集的几何形状类型 - 例如物理碰撞体。
defaultArea 分配给结果的区域类型,除非被 NavMeshMarkup 修改。
markups 允许更精确地控制对象收集方式的标记列表。
results 存储结果的列表,该列表会在调用开始时被清除。

描述

收集一个变换层级中的渲染器或物理碰撞体以及地形。(UnityEngine)


public static void CollectSources (Transform root, int includedLayerMask, AI.NavMeshCollectGeometry geometry, int defaultArea, bool generateLinksByDefault, List<NavMeshBuildMarkup> markups, bool includeOnlyMarkedObjects, List<NavMeshBuildSource> results);

参数

root 如果不为 null,则仅考虑查询中的根及其子项;如果为 null,则包括加载的所有项。
includedLayerMask 指定哪些层包含在查询中。
geometry 要收集的几何形状类型 - 例如物理碰撞体。
defaultArea 分配给结果的区域类型,除非被 NavMeshMarkup 修改。
generateLinksByDefault If true, all the source will be considered for generating links. Otherwise, only the marked sources will be considered.
markups 允许更精确地控制对象收集方式的标记列表。
includeOnlyMarkedObjects Specifies if only objects with markups are collected.
results 存储结果的列表,该列表会在调用开始时被清除。

描述

收集一个变换层级中的渲染器或物理碰撞体以及地形。(UnityEngine)