Fixes TileSet set as local to scene

This commit is contained in:
Gilles Roudière
2023-06-20 16:35:22 +02:00
parent d7af287ce3
commit c54d407fa5
4 changed files with 26 additions and 2 deletions

View File

@@ -8,6 +8,7 @@
Tiles in a source are indexed with two IDs, coordinates ID (of type Vector2i) and an alternative ID (of type int), named according to their use in the [TileSetAtlasSource] class.
Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base [TileSetSource] class only exposes getters for them.
You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using [method get_tiles_count] and [method get_tile_id], then over alternative IDs using [method get_alternative_tiles_count] and [method get_alternative_tile_id].
[b]Warning:[/b] [TileSetSource] can only be added to one TileSet at the same time. Calling [method TileSet.add_source] on a second [TileSet] will remove the source from the first one.
</description>
<tutorials>
</tutorials>