mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Use threads for baking navigation mesh inside editor
Enables threaded navigation mesh baking inside the editor.
This commit is contained in:
parent
83b916bb00
commit
2bc2b52bd1
3 changed files with 3 additions and 3 deletions
|
@ -72,7 +72,7 @@ NavMeshGenerator2D::NavMeshGenerator2D() {
|
||||||
|
|
||||||
// Using threads might cause problems on certain exports or with the Editor on certain devices.
|
// Using threads might cause problems on certain exports or with the Editor on certain devices.
|
||||||
// This is the main switch to turn threaded navmesh baking off should the need arise.
|
// This is the main switch to turn threaded navmesh baking off should the need arise.
|
||||||
use_threads = baking_use_multiple_threads && !Engine::get_singleton()->is_editor_hint();
|
use_threads = baking_use_multiple_threads;
|
||||||
}
|
}
|
||||||
|
|
||||||
NavMeshGenerator2D::~NavMeshGenerator2D() {
|
NavMeshGenerator2D::~NavMeshGenerator2D() {
|
||||||
|
|
|
@ -85,7 +85,7 @@ NavMeshGenerator3D::NavMeshGenerator3D() {
|
||||||
|
|
||||||
// Using threads might cause problems on certain exports or with the Editor on certain devices.
|
// Using threads might cause problems on certain exports or with the Editor on certain devices.
|
||||||
// This is the main switch to turn threaded navmesh baking off should the need arise.
|
// This is the main switch to turn threaded navmesh baking off should the need arise.
|
||||||
use_threads = baking_use_multiple_threads && !Engine::get_singleton()->is_editor_hint();
|
use_threads = baking_use_multiple_threads;
|
||||||
}
|
}
|
||||||
|
|
||||||
NavMeshGenerator3D::~NavMeshGenerator3D() {
|
NavMeshGenerator3D::~NavMeshGenerator3D() {
|
||||||
|
|
|
@ -99,7 +99,7 @@ void NavigationMeshEditor::_bake_pressed() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
node->bake_navigation_mesh(false);
|
node->bake_navigation_mesh(true);
|
||||||
|
|
||||||
node->update_gizmos();
|
node->update_gizmos();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue