Merge pull request #83244 from KoBeWi/tile_map_is_now_tile_set_and_vice_versa

Swap TileMap and TileSet buttons
This commit is contained in:
Rémi Verschelde 2023-10-13 11:47:55 +02:00
commit 37ee293be8
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 7 additions and 3 deletions

View file

@ -413,7 +413,9 @@ bool TileMapEditorPlugin::is_editor_visible() const {
}
TileMapEditorPlugin::TileMapEditorPlugin() {
memnew(TilesEditorUtils);
if (!TilesEditorUtils::get_singleton()) {
memnew(TilesEditorUtils);
}
tile_map_plugin_singleton = this;
editor = memnew(TileMapEditor);
@ -462,7 +464,9 @@ ObjectID TileSetEditorPlugin::get_edited_tileset() const {
}
TileSetEditorPlugin::TileSetEditorPlugin() {
DEV_ASSERT(tile_map_plugin_singleton);
if (!TilesEditorUtils::get_singleton()) {
memnew(TilesEditorUtils);
}
tile_set_plugin_singleton = this;
editor = memnew(TileSetEditor);

View file

@ -257,8 +257,8 @@ void register_editor_types() {
EditorPlugins::add_by_type<Cast2DEditorPlugin>();
EditorPlugins::add_by_type<Skeleton2DEditorPlugin>();
EditorPlugins::add_by_type<Sprite2DEditorPlugin>();
EditorPlugins::add_by_type<TileMapEditorPlugin>();
EditorPlugins::add_by_type<TileSetEditorPlugin>();
EditorPlugins::add_by_type<TileMapEditorPlugin>();
// For correct doc generation.
GLOBAL_DEF("editor/run/main_run_args", "");