Skip to content

Commit 4a4d6df

Browse files
committed
Merge pull request godotengine#90508 from smix8/thread_bake
Use threads for baking navigation mesh inside editor
2 parents fcca9b3 + 2bc2b52 commit 4a4d6df

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

modules/navigation/2d/nav_mesh_generator_2d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ NavMeshGenerator2D::NavMeshGenerator2D() {
7272

7373
// Using threads might cause problems on certain exports or with the Editor on certain devices.
7474
// This is the main switch to turn threaded navmesh baking off should the need arise.
75-
use_threads = baking_use_multiple_threads && !Engine::get_singleton()->is_editor_hint();
75+
use_threads = baking_use_multiple_threads;
7676
}
7777

7878
NavMeshGenerator2D::~NavMeshGenerator2D() {

modules/navigation/3d/nav_mesh_generator_3d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ NavMeshGenerator3D::NavMeshGenerator3D() {
8585

8686
// Using threads might cause problems on certain exports or with the Editor on certain devices.
8787
// This is the main switch to turn threaded navmesh baking off should the need arise.
88-
use_threads = baking_use_multiple_threads && !Engine::get_singleton()->is_editor_hint();
88+
use_threads = baking_use_multiple_threads;
8989
}
9090

9191
NavMeshGenerator3D::~NavMeshGenerator3D() {

modules/navigation/editor/navigation_mesh_editor_plugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void NavigationMeshEditor::_bake_pressed() {
9999
}
100100
}
101101

102-
node->bake_navigation_mesh(false);
102+
node->bake_navigation_mesh(true);
103103

104104
node->update_gizmos();
105105
}

0 commit comments

Comments
 (0)