Version: 2018.4
public static AsyncOperation UpdateNavMeshDataAsync (AI.NavMeshData data, AI.NavMeshBuildSettings buildSettings, List<NavMeshBuildSource> sources, Bounds localBounds);

パラメーター

dataThe NavMeshData to update.
buildSettingsThe build settings which is used to update the NavMeshData. The build settings is also hashed along with the data, so changing settings will likely to cause full rebuild.
sourcesList of input geometry used for baking, they describe the surfaces to walk on or obstacles to avoid.
localBoundsBounding box relative to position and rotation which describes to volume where the NavMesh should be built. Empty bounds is treated as no-bounds, that is, the NavMesh will cover all the inputs.

戻り値

AsyncOperation Can be used to check the progress of the update.

説明

Asynchronously and incrementally updates the NavMeshData based on the sources. (UnityEngine)

Each time NavMeshData is built or updated, the source data is hashed, and the hashes are stored along with the NavMeshData.

When UpdateNavMeshDataAsync() is called, first the hashes are compared and only changed portions are rebuilt. For this reason, the list of sources should always contain all the input geometry, even if they haven't moved or changed. If the list of sources is modified between calls to UpdateNavMeshDataAsync the missing/added sources are considered changes.

You must supply a Bounds struct for the bounds parameter.

See Also: NavMeshBuilder.Cancel.

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