Exemplo n.º 1
0
        private void UpdateNavMesh(bool asyync = false)
        {
            _navMesh     = new NavMeshData( );
            _navInstance = NavMesh.AddNavMeshData(_navMesh);
            var settings = NavMesh.GetSettingsByID(0);

            NavMeshSourceTag.Collect(ref _sources);
            var bounds = BoundsHelper.QauntizeBounds(_center, size, factor);

            if (asyync)
            {
                _operation = NavMeshBuilder.UpdateNavMeshDataAsync(_navMesh, settings, _sources, bounds);
            }
            else
            {
                NavMeshBuilder.UpdateNavMeshData(_navMesh, settings, _sources, bounds);
            }
        }
Exemplo n.º 2
0
 private Bounds GetBounds( )
 {
     return(BoundsHelper.QauntizeBounds(_center, size, factor));
 }