1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Fix TileMap patterns creation

This commit is contained in:
Gilles Roudière
2023-02-10 10:46:19 +01:00
parent c4fb119f03
commit 89ccdc7d34
2 changed files with 2 additions and 2 deletions

View File

@@ -117,7 +117,7 @@ void TilesEditorPlugin::_thread() {
tile_map->set_position(-(scale * encompassing_rect.get_center()) + thumbnail_size2 / 2);
// Add the viewport at the last moment to avoid rendering too early.
EditorNode::get_singleton()->add_child(viewport);
EditorNode::get_singleton()->call_deferred("add_child", viewport);
RS::get_singleton()->connect(SNAME("frame_pre_draw"), callable_mp(const_cast<TilesEditorPlugin *>(this), &TilesEditorPlugin::_preview_frame_started), Object::CONNECT_ONE_SHOT);