diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp index 8404ea09691..ce5da811c1e 100644 --- a/editor/plugins/tiles/atlas_merging_dialog.cpp +++ b/editor/plugins/tiles/atlas_merging_dialog.cpp @@ -95,7 +95,9 @@ void AtlasMergingDialog::_generate_merged(Vector> p_atla } } + merged->set_name(p_atlas_sources[0]->get_name()); merged->set_texture(ImageTexture::create_from_image(output_image)); + merged->set_texture_region_size(new_texture_region_size); // Copy the tiles to the merged TileSetAtlasSource. for (int source_index = 0; source_index < p_atlas_sources.size(); source_index++) { @@ -130,9 +132,6 @@ void AtlasMergingDialog::_generate_merged(Vector> p_atla } } } - - merged->set_name(p_atlas_sources[0]->get_name()); - merged->set_texture_region_size(new_texture_region_size); } }