-Added an optimization so physics shapes are configured later, speeds up grid map loading and editing

This commit is contained in:
Juan Linietsky 2017-09-03 14:53:17 -03:00
parent 29db531fc8
commit adde89e8b1
9 changed files with 65 additions and 14 deletions

View file

@ -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");