mirror of https://github.com/godotengine/godot
During reloading in `GDScriptLanguage::reload_all_scripts` a placeholder instance that must remain so is replaced with a new placeholder instance. The state is then restored by calling `ScriptInstance::set` for each property. This does not work if the script is missing the properties due to build/parse failing. The fix for such cases is to call `placeholder_set_fallback` instead of `set` on the script instance. I took this chance to move the `build_failed` flag from `PlaceHolderScriptInstance` to `Script`. That improves the code a lot. I also renamed it to `placeholder_fallback_enabled` which is a much better name (`build_failed` could lead to misunderstandings). |
||
|---|---|---|
| .. | ||
| doc_classes | ||
| editor | ||
| SCsub | ||
| config.py | ||
| gdscript.cpp | ||
| gdscript.h | ||
| gdscript_compiler.cpp | ||
| gdscript_compiler.h | ||
| gdscript_editor.cpp | ||
| gdscript_function.cpp | ||
| gdscript_function.h | ||
| gdscript_functions.cpp | ||
| gdscript_functions.h | ||
| gdscript_parser.cpp | ||
| gdscript_parser.h | ||
| gdscript_tokenizer.cpp | ||
| gdscript_tokenizer.h | ||
| register_types.cpp | ||
| register_types.h | ||