diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-07-29 22:40:09 +0200 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-07-29 22:40:12 +0200 |
commit | f3c7527225c73812a7de10dfc273ba0e82e8d7ec (patch) | |
tree | b0e9852a4d3514fa27a83f0f96b1232ecadbfbec /modules/mono/csharp_script.h | |
parent | 6601502acd2fd5811418d65d4e26750ee83071c1 (diff) |
Fix case where exported properties value is lost
Fixes exported property modified values lost when creating a placeholder script instance with a failed script compilation
- Object set/get will call PlaceHolderScriptInstance's new fallback set/get methods as a last resort. This way, placeholder script instances can keep the values for storage or until the script is compiled successfuly.
- Script::can_instance() will only return true if a real script instance can be created. Otherwise, in the case of placeholder script instances, it will return false.
- Object::set_script(script) is now in charge of requesting the creation of placeholder script instances. It's no longer Script::instance_create(owner)'s duty.
- PlaceHolderScriptInstance has a new method set_build_failed(bool) to determine whether it should call into its script methods or not.
- Fixed a few problems during reloading of C# scripts.
Diffstat (limited to 'modules/mono/csharp_script.h')
-rw-r--r-- | modules/mono/csharp_script.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index 7f9732c297..daa2b5bdf1 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -139,6 +139,7 @@ public: virtual bool can_instance() const; virtual StringName get_instance_base_type() const; virtual ScriptInstance *instance_create(Object *p_this); + virtual PlaceHolderScriptInstance *placeholder_instance_create(Object *p_this); virtual bool instance_has(const Object *p_this) const; virtual bool has_source_code() const; |