Version: 2017.3

説明

For convenience, you can create a list of build sources directly from the current geometry.

The collection can be controlled in terms of layers, type of geometry and by collecting either by hierarchy or volume.


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

パラメーター

includedWorldBounds The queried objects must overlap these bounds to be included in the results.
includedLayerMask Specifies which layers are included in the query.
geometry Which type of geometry to collect - e.g. physics colliders.
defaultArea Area type to assign to results, unless modified by NavMeshMarkup.
markups List of markups which allows finer control over how objects are collected.
results List where results are stored, the list is cleared at the beginning of the call.

説明

Collects renderers or physics colliders, and terrains within a volume.


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

パラメーター

root If not null, consider only root and its children in the query; if null, includes everything loaded.
includedLayerMask Specifies which layers are included in the query.
geometry Which type of geometry to collect - e.g. physics colliders.
defaultArea Area type to assign to results, unless modified by NavMeshMarkup.
markups List of markups which allows finer control over how objects are collected.
results List where results are stored, the list is cleared at the beginning of the call.

説明

Collects renderers or physics colliders, and terrains within a transform hierarchy.

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