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:
smix8
2023-05-23 19:55:31 +02:00
parent eb86dabee0
commit ee14b010ac
15 changed files with 569 additions and 207 deletions

View File

@@ -35,6 +35,7 @@
#include "core/templates/rid.h"
#include "scene/3d/navigation_region_3d.h"
#include "scene/resources/navigation_mesh_source_geometry_data_3d.h"
#include "servers/navigation/navigation_path_query_parameters_3d.h"
#include "servers/navigation/navigation_path_query_result_3d.h"
@@ -288,6 +289,9 @@ public:
virtual NavigationUtilities::PathQueryResult _query_path(const NavigationUtilities::PathQueryParameters &p_parameters) const = 0;
virtual void parse_source_geometry_data(const Ref<NavigationMesh> &p_navigation_mesh, Ref<NavigationMeshSourceGeometryData3D> p_source_geometry_data, Node *p_root_node, const Callable &p_callback = Callable()) = 0;
virtual void bake_from_source_geometry_data(Ref<NavigationMesh> p_navigation_mesh, const Ref<NavigationMeshSourceGeometryData3D> &p_source_geometry_data, const Callable &p_callback = Callable()) = 0;
NavigationServer3D();
~NavigationServer3D() override;