NavMeshBuilder.UpdateNavMeshData and NavMeshBuilder.UpdateNavMeshDataAsync

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。取消.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值