Browse Source

Fix visibility toggle for baked GridMaps

(cherry picked from commit 809d88b925d440fef6cb9b6572315e365f91487e)
jfons 4 years ago
parent
commit
ab3b7a57f2
1 changed files with 4 additions and 0 deletions
  1. 4 0
      modules/gridmap/grid_map.cpp

+ 4 - 0
modules/gridmap/grid_map.cpp

@@ -746,6 +746,10 @@ void GridMap::_update_visibility() {
 			VS::get_singleton()->instance_set_visible(mi.instance, is_visible_in_tree());
 		}
 	}
+
+	for (int i = 0; i < baked_meshes.size(); i++) {
+		VS::get_singleton()->instance_set_visible(baked_meshes[i].instance, is_visible_in_tree());
+	}
 }
 
 void GridMap::_queue_octants_dirty() {