You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For performance reasons, all TileMap updates are batched at the end of a frame. Notably, this means that scene tiles from a [TileSetScenesCollectionSource] may be initialized after their parent. This is only queued when inside the scene tree.
To force an update earlier on, call [method update_internals].
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>
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 byTileSetAtlasSource::_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:
Minimal reproduction project (MRP)
update-internals.zip
The text was updated successfully, but these errors were encountered: