NavMeshBuilder.UpdateNavMeshData
Incrementally updates the NavMeshData based on the sources.
Each time NavMeshData is built or updated, the source data is hashed, and the hashes are stored along with the NavMeshData.
When called, first the hashes are recomputed and 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 UpdateNavMeshData the missing/added sources are considered changes.
基于源增量更新NavMeshData。
每次构建或更新NavMeshData时,源数据都被哈希化,哈希值与NavMeshData一起存储。
调用时,首先重新计算和比较哈希值,只重建更改的部分。因此,源列表应始终包含所有输入几何体,即使它们没有移动或更改。如果在调用UpdateNavMeshData 之间修改了源列表,则丢失/添加的源将被视为更改。
值得一提的是异步的方法貌似在Profile里面找不到,应该是放到子线程里面了。
要看性能的话要先看同步方法的性能,貌似看来UpdateNavMeshData 的性能还是可以的,动态烘焙地图貌似也不会有压力啊。
NavMeshBuilder.UpdateNavMeshDataAsync
Asynchronously and incrementally updates the NavMeshData based on the sources.
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.
基于源异步增量更新NavMeshData。
每次构建或更新NavMeshData时,源数据都被哈希化,哈希值与NavMeshData一起存储。
当调用UpdateNavMeshDataAsync()时,首先比较哈希值,只重建更改的部分。因此,源列表应始终包含所有输入几何体,即使它们没有移动或更改。如果在调用UpdateNavMeshDataAsync之间修改了源列表,则丢失/添加的源将被视为更改。
必须为Bounds参数提供Bounds结构。
另请参见:NavMeshBuilder。取消.