apply built-in scripts when running the game, closes #4987
(cherry picked from commit 482b21a5a4
)
This commit is contained in:
parent
7987147502
commit
cb37d1bb91
|
@ -2076,9 +2076,12 @@ void ScriptEditor::save_all_scripts() {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Ref<Script> script = ste->get_edited_script();
|
Ref<Script> script = ste->get_edited_script();
|
||||||
|
if (script.is_valid())
|
||||||
|
ste->apply_code();
|
||||||
|
|
||||||
if (script->get_path()!="" && script->get_path().find("local://")==-1 &&script->get_path().find("::")==-1) {
|
if (script->get_path()!="" && script->get_path().find("local://")==-1 &&script->get_path().find("::")==-1) {
|
||||||
//external script, save it
|
//external script, save it
|
||||||
ste->apply_code();
|
|
||||||
editor->save_resource(script);
|
editor->save_resource(script);
|
||||||
//ResourceSaver::save(script->get_path(),script);
|
//ResourceSaver::save(script->get_path(),script);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue