mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Fix for threaded NavigationMesh baking under new thread guards
Fixes threaded NavigationMesh baking under new SceneTree thread guards that blocked the process.
This commit is contained in:
parent
eb86dabee0
commit
ee14b010ac
15 changed files with 569 additions and 207 deletions
|
|
@ -41,6 +41,7 @@
|
|||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/label.h"
|
||||
#include "scene/resources/navigation_mesh_source_geometry_data_3d.h"
|
||||
|
||||
void NavigationMeshEditor::_node_removed(Node *p_node) {
|
||||
if (p_node == node) {
|
||||
|
|
@ -98,7 +99,10 @@ void NavigationMeshEditor::_bake_pressed() {
|
|||
}
|
||||
|
||||
NavigationMeshGenerator::get_singleton()->clear(node->get_navigation_mesh());
|
||||
NavigationMeshGenerator::get_singleton()->bake(node->get_navigation_mesh(), node);
|
||||
Ref<NavigationMeshSourceGeometryData3D> source_geometry_data;
|
||||
source_geometry_data.instantiate();
|
||||
NavigationMeshGenerator::get_singleton()->parse_source_geometry_data(node->get_navigation_mesh(), source_geometry_data, node);
|
||||
NavigationMeshGenerator::get_singleton()->bake_from_source_geometry_data(node->get_navigation_mesh(), source_geometry_data);
|
||||
|
||||
node->update_gizmos();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue