diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-30 13:28:22 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-30 13:28:22 +0100 |
commit | 6c19a619adbcafd33603b6993e7a8b2452269b68 (patch) | |
tree | 980527fa4f6b4cce540eb65d06bf366b31629b1c /scene/2d/tile_map.cpp | |
parent | 833c0d24dbf3c442857fd9d7b1fd17918fadddc9 (diff) | |
parent | 62c874732dcfd78026a5456226788ffd183b6753 (diff) |
Merge pull request #72365 from groud/warn_ysort_tilemap
Warn when a TileMap layer is Y-sorted but not the TileMap node itself.
Diffstat (limited to 'scene/2d/tile_map.cpp')
-rw-r--r-- | scene/2d/tile_map.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index a1304ab991..95bf67d38d 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -3969,6 +3969,17 @@ PackedStringArray TileMap::get_configuration_warnings() const { } } + // Check if Y-sort is enabled on a layer but not on the node. + if (!is_y_sort_enabled()) { + for (const TileMapLayer &layer : layers) { + if (layer.y_sort_enabled) { + warnings.push_back(RTR("A TileMap layer is set as Y-sorted, but Y-sort is not enabled on the TileMap node itself.")); + break; + } + } + } + + // Check if we are in isometric mode without Y-sort enabled. if (tile_set.is_valid() && tile_set->get_tile_shape() == TileSet::TILE_SHAPE_ISOMETRIC) { bool warn = !is_y_sort_enabled(); if (!warn) { |