diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-09-03 14:53:17 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-09-03 14:54:15 -0300 |
commit | adde89e8b1c66b4f4814c3b47a5d347ff576428b (patch) | |
tree | 5ae201a8f957bb934a8386921c204a26491c5359 /editor | |
parent | 29db531fc8360b1e6d5e23008b208517b6d8c627 (diff) |
-Added an optimization so physics shapes are configured later, speeds up grid map loading and editing
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/cube_grid_theme_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 8 |
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"); |