소스 검색

apply built-in scripts when running the game, closes #4987

Juan Linietsky 9 년 전
부모
커밋
482b21a5a4
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      tools/editor/plugins/script_editor_plugin.cpp

+ 4 - 1
tools/editor/plugins/script_editor_plugin.cpp

@@ -2147,9 +2147,12 @@ void ScriptEditor::save_all_scripts() {
 			continue;
 
 		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) {
 			//external script, save it
-			ste->apply_code();
+
 			editor->save_resource(script);
 			//ResourceSaver::save(script->get_path(),script);
 		}