浏览代码

Merge pull request #92994 from smix8/navmesh_2d_clear

Fix NavigationRegion2D editor plugin clear button not updating debug visuals
Rémi Verschelde 1 年之前
父节点
当前提交
1e0015ac64
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      editor/plugins/navigation_polygon_editor_plugin.cpp

+ 2 - 0
editor/plugins/navigation_polygon_editor_plugin.cpp

@@ -217,6 +217,8 @@ void NavigationPolygonEditor::_clear_pressed() {
 	if (node) {
 		if (node->get_navigation_polygon().is_valid()) {
 			node->get_navigation_polygon()->clear();
+			// Needed to update all the region internals.
+			node->set_navigation_polygon(node->get_navigation_polygon());
 		}
 	}