Przeglądaj źródła

Ensure the visibility is updated when entering the tree

(cherry picked from commit 3a3ebbf4c9ee51550b769ef8251a14b66f3fe183)
Chia-Hsiang Cheng 2 lat temu
rodzic
commit
9e7652c5db
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      modules/gridmap/grid_map.cpp

+ 3 - 2
modules/gridmap/grid_map.cpp

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