|
@@ -1867,6 +1867,7 @@ int EditorNode::_save_external_resources(bool p_also_save_external_data) {
|
|
res->set_edited(false);
|
|
res->set_edited(false);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ bool script_was_saved = false;
|
|
for (const String &E : edited_resources) {
|
|
for (const String &E : edited_resources) {
|
|
Ref<Resource> res = ResourceCache::get_ref(E);
|
|
Ref<Resource> res = ResourceCache::get_ref(E);
|
|
if (res.is_null()) {
|
|
if (res.is_null()) {
|
|
@@ -1876,10 +1877,18 @@ int EditorNode::_save_external_resources(bool p_also_save_external_data) {
|
|
if (ps.is_valid()) {
|
|
if (ps.is_valid()) {
|
|
continue; // Do not save PackedScenes, this will mess up the editor.
|
|
continue; // Do not save PackedScenes, this will mess up the editor.
|
|
}
|
|
}
|
|
|
|
+ if (!script_was_saved) {
|
|
|
|
+ Ref<Script> scr = res;
|
|
|
|
+ script_was_saved = scr.is_valid();
|
|
|
|
+ }
|
|
ResourceSaver::save(res, res->get_path(), flg);
|
|
ResourceSaver::save(res, res->get_path(), flg);
|
|
saved++;
|
|
saved++;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (script_was_saved) {
|
|
|
|
+ ScriptEditor::get_singleton()->update_script_times();
|
|
|
|
+ }
|
|
|
|
+
|
|
if (p_also_save_external_data) {
|
|
if (p_also_save_external_data) {
|
|
for (int i = 0; i < editor_data.get_editor_plugin_count(); i++) {
|
|
for (int i = 0; i < editor_data.get_editor_plugin_count(); i++) {
|
|
EditorPlugin *plugin = editor_data.get_editor_plugin(i);
|
|
EditorPlugin *plugin = editor_data.get_editor_plugin(i);
|