Keep scene tiles even if the TileMap is invisible

(cherry picked from commit 25e927e56b)
This commit is contained in:
Gilles Roudière 2023-12-04 18:39:16 +01:00 committed by Rémi Verschelde
parent b5e7b2c7a7
commit 77383e63a6
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1191,7 +1191,7 @@ void TileMapLayer::_scenes_update() {
const Ref<TileSet> &tile_set = tile_map_node->get_tileset();
// Check if we should cleanup everything.
bool forced_cleanup = in_destructor || !enabled || !tile_map_node->is_inside_tree() || !tile_set.is_valid() || !tile_map_node->is_visible_in_tree();
bool forced_cleanup = in_destructor || !enabled || !tile_map_node->is_inside_tree() || !tile_set.is_valid();
if (forced_cleanup) {
// Clean everything.