Open
Description
Tested versions
4.2.2.stable / 4.3.beta1
System information
Arch Linux
Issue description
It's documented that scene tiles may not be available when the tilemap is ready, and users can call update_internals()
to force immediate update.
godot/doc/classes/TileMapLayer.xml
Lines 8 to 9 in 3a11eb9
Calling update_internals()
does force create the scene tiles. But these scene tile instances seem temporary. Another deferred internal update (caused by TileSetAtlasSource::_update_padded_texture
) will soon destroy these instances after _ready()
.
This seems like a bug, because scene tile instances are not related to the TileSetAtlasSource
texture update. They should not be recreated.
Steps to reproduce
Create a TileMapLayer and draw a scene tile.
Run the MRP. Sample output:
Scene tiles are not created when _ready: []
Call update_internals()
Created <Node2D#28823258389>
Now scene tiles are created: [SceneTile:<Node2D#28823258389>]
Now exit _ready
Created <Node2D#29041362196>
In a deferred call: [SceneTile:<Node2D#28823258389>, @Node2D@2:<Node2D#29041362196>]
Destroyed SceneTile:<Node2D#28823258389>