浏览代码

Merge pull request #81106 from garychia/gridmap_visibility

GridMap: Ensure the visibility is updated when entering the tree
Rémi Verschelde 2 年之前
父节点
当前提交
d18963485e
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      modules/gridmap/grid_map.cpp

+ 3 - 2
modules/gridmap/grid_map.cpp

@@ -906,13 +906,14 @@ void GridMap::_notification(int p_what) {
 			}
 		} break;
 
-#ifdef DEBUG_ENABLED
 		case NOTIFICATION_ENTER_TREE: {
+#ifdef DEBUG_ENABLED
 			if (bake_navigation && NavigationServer3D::get_singleton()->get_debug_navigation_enabled()) {
 				_update_navigation_debug_edge_connections();
 			}
-		} break;
 #endif // DEBUG_ENABLED
+			_update_visibility();
+		} break;
 
 		case NOTIFICATION_TRANSFORM_CHANGED: {
 			Transform3D new_xform = get_global_transform();