运行时候动态的桥面。
方式1:使用navMeshSurface.BuildNavMesh()动态创建
https://answers.unity.com/questions/1480956/how-to-generate-nav-mesh-floor-in-a-procedural-gen.html
https://www.youtube.com/watch?v=r4JUdM_5r6s
方式2:官方案例2中
LocalNavMeshBuilder.cs
NavMeshBuilder.UpdateNavMeshDataAsync
或
NavMeshBuilder.UpdateNavMeshData
1 void UpdateNavMesh(bool asyncUpdate = false) 2 { 3 NavMeshSourceTag.Collect(ref m_Sources); 4 var defaultBuildSettings = NavMesh.GetSettingsByID(0); 5 var bounds = QuantizedBounds(); 6 7 if (asyncUpdate) 8 m_Operation = NavMeshBuilder.UpdateNavMeshDataAsync(m_NavMesh, defaultBuildSettings, m_Sources, bounds); 9 else 10 NavMeshBuilder.UpdateNavMeshData(m_NavMesh, defaultBuildSettings, m_Sources, bounds); 11 }
标签:NavMesh,bounds,生成,Sources,unity,navmesh,defaultBuildSettings,NavMeshBuilder From: https://www.cnblogs.com/sun-shadow/p/16739067.html
估计每个动态的“floor”对应一个surcface性能会好一些,冗余数据少。