1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

Ability to reload scripts on running game

This commit is contained in:
Juan Linietsky
2016-06-01 20:22:02 -03:00
parent 45752eaae4
commit 9e745b920f
12 changed files with 247 additions and 18 deletions

View File

@@ -291,6 +291,8 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) {
_set_object_property(cmd[1],cmd[2],cmd[3]);
} else if (command=="reload_scripts") {
reload_all_scripts=true;
} else if (command=="breakpoint") {
bool set = cmd[3];
@@ -698,7 +700,8 @@ void ScriptDebuggerRemote::_poll_events() {
profiling=false;
_send_profiling_data(false);
print_line("PROFILING END!");
} else if (command=="reload_scripts") {
reload_all_scripts=true;
} else if (command=="breakpoint") {
bool set = cmd[3];
@@ -863,6 +866,14 @@ void ScriptDebuggerRemote::idle_poll() {
}
}
if (reload_all_scripts) {
for(int i=0;i<ScriptServer::get_language_count();i++) {
ScriptServer::get_language(i)->reload_all_scripts();
}
reload_all_scripts=false;
}
_poll_events();
}
@@ -1012,6 +1023,7 @@ ScriptDebuggerRemote::ScriptDebuggerRemote() {
profile_info_ptrs.resize(profile_info.size());
profiling=false;
max_frame_functions=16;
reload_all_scripts=false;
}