diff options
Diffstat (limited to 'editor/plugins/tiles/tiles_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/tiles/tiles_editor_plugin.cpp | 8 |
1 files changed, 6 insertions, 2 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); |