diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-01-10 00:26:00 +0100 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-01-10 01:58:50 +0100 |
commit | ea85ff0dc2a04e695d396f62ce5949f4e04254e4 (patch) | |
tree | 04bb98e3619c4060484f189884014be5efe77efb /scene/3d/camera.h | |
parent | 9a8569d434107e721f5c7de0bf8ffe6471367d28 (diff) |
Fix properties being lost when reloading placeholder GDScript instance
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).
Diffstat (limited to 'scene/3d/camera.h')
0 files changed, 0 insertions, 0 deletions