summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/cube_grid_theme_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_editor_plugin.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/editor/plugins/cube_grid_theme_editor_plugin.cpp b/editor/plugins/cube_grid_theme_editor_plugin.cpp
index 08b38c2ca2..decf8b2bb4 100644
--- a/editor/plugins/cube_grid_theme_editor_plugin.cpp
+++ b/editor/plugins/cube_grid_theme_editor_plugin.cpp
@@ -88,7 +88,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
if (mesh.is_null())
continue;
- int id = p_library->find_item_name(mi->get_name());
+ int id = p_library->find_item_by_name(mi->get_name());
if (id < 0) {
id = p_library->get_last_unused_item_id();
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index a529f152dc..10a72ca5be 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -972,6 +972,14 @@ void ScriptEditor::_menu_option(int p_option) {
EditorNode::get_singleton()->show_warning("Can't obtain the script for running");
break;
}
+
+ current->apply_code();
+ Error err = scr->reload(false); //hard reload script before running always
+
+ if (err != OK) {
+ EditorNode::get_singleton()->show_warning("Script failed reloading, check console for errors.");
+ return;
+ }
if (!scr->is_tool()) {
EditorNode::get_singleton()->show_warning("Script is not in tool mode, will not be able to run");