Open SaronTetra opened 1 year ago
I'm experiencing the same bug, thanks for sending such a great write-up.
Can you still reproduce this in 4.0.3 and 4.1-beta3 or later?
The property lists returned by get_property_list()
of new_atlas
and new_atlas.duplicate()
are different.
TileSetAtlasSource
can only be assigned to one TileSet
. If it is assigned to a new TileSet
during duplicate()
, this will cause the TileSetAtlasSource
to be removed from the previous TileSet
. The information loss when using duplicate(true)
to copy TileSet
is because the original TileSet
(new_tileset
) has lost TileSetAtlasSource
when duplicate()
.
The missing information in TileSetAtlasSource
is saved via TileData
, which is also TileSet
specific, and if the tile_set
is missing, the value cannot be read.
Godot version
4.0-stable
System information
Windows 10
Issue description
Using
ResourceSaver.save()
orduplicate()
onTileSetAtlasResource
does not duplicate all properties. Resulting resources after saving are missing Physics Layer and Terrain Layer informationPart of saved TileSet without duplicate:
Part of saved TileSetAtlasResource without duplicate:
Steps to reproduce
For minimal project:
out
folderFrom scratch:
func _ready(): var new_tileset = preload("res://tile_set.tres") var new_atlas = new_tileset.get_source(0)