diff options
-rw-r--r-- | editor/plugins/tiles/tiles_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | editor/register_editor_types.cpp | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/editor/plugins/tiles/tiles_editor_plugin.cpp b/editor/plugins/tiles/tiles_editor_plugin.cpp index e50d21bbf8..b96f3f21b8 100644 --- a/editor/plugins/tiles/tiles_editor_plugin.cpp +++ b/editor/plugins/tiles/tiles_editor_plugin.cpp @@ -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); diff --git a/editor/register_editor_types.cpp b/editor/register_editor_types.cpp index 1e7aabf001..9a667d5775 100644 --- a/editor/register_editor_types.cpp +++ b/editor/register_editor_types.cpp @@ -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", ""); |