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/plugins/script_editor_plugin.cpp | |
parent | 29db531fc8360b1e6d5e23008b208517b6d8c627 (diff) | |
download | redot-engine-adde89e8b1c66b4f4814c3b47a5d347ff576428b.tar.gz |
-Added an optimization so physics shapes are configured later, speeds up grid map loading and editing
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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"); |