From 797bb1d97e0af3c8e2cfe802d0d8e46f97a5a3c9 Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Wed, 26 Jan 2022 01:16:50 +0300 Subject: [PATCH] Ensure that NavMesh baking updates the inspector --- modules/navigation/navigation_mesh_generator.cpp | 2 ++ scene/resources/navigation_mesh.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp index 035ea1fbd6c..978d9612447 100644 --- a/modules/navigation/navigation_mesh_generator.cpp +++ b/modules/navigation/navigation_mesh_generator.cpp @@ -657,6 +657,8 @@ void NavigationMeshGenerator::bake(Ref p_nav_mesh, Node *p_node) if (ep) memdelete(ep); #endif + + p_nav_mesh->property_list_changed_notify(); } void NavigationMeshGenerator::clear(Ref p_nav_mesh) { diff --git a/scene/resources/navigation_mesh.h b/scene/resources/navigation_mesh.h index c20678f0296..b8fa2406c5b 100644 --- a/scene/resources/navigation_mesh.h +++ b/scene/resources/navigation_mesh.h @@ -34,10 +34,13 @@ #include "scene/resources/mesh.h" class Mesh; +class NavigationMeshGenerator; class NavigationMesh : public Resource { GDCLASS(NavigationMesh, Resource); + friend class NavigationMeshGenerator; + PoolVector vertices; struct Polygon { Vector indices;