summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.h
diff options
context:
space:
mode:
authorpepegadeveloper123 <smjgs24@naver.com>2020-05-11 03:20:11 +0900
committerpepegadeveloper123 <smjgs24@naver.com>2020-05-11 03:20:11 +0900
commit4e00d8520db33de62645043af3d9d3ca83b1153f (patch)
treee929517663eb2ec491bcc6f662a083e9c48dd223 /modules/mono/csharp_script.h
parent6a0473bcc23c096ef9ee929632a209761c2668f6 (diff)
downloadredot-engine-4e00d8520db33de62645043af3d9d3ca83b1153f.tar.gz
Inherited C# scene not inheriting parent's fields
When a child scene inherits a parent scene with a C# root node, the parent scene's export variables appear to assume values set in the parent scene, in the child scene's Inspector. However, when the child scene is played, the parent scene's export variables assume default values. When a node is created, it inherits its parent C# script's fields from the map CSharpScriptInstance::script->member_info. However this map was not initialized outside the editor, and this commit ensured it is. This fixes issues #36480 and #37581.
Diffstat (limited to 'modules/mono/csharp_script.h')
-rw-r--r--modules/mono/csharp_script.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index 05e2857538..c9ea482c36 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -147,8 +147,9 @@ private:
bool _get_signal(GDMonoClass *p_class, GDMonoMethod *p_delegate_invoke, Vector<SignalParameter> &params);
bool _update_exports();
-#ifdef TOOLS_ENABLED
+
bool _get_member_export(IMonoClassMember *p_member, bool p_inspect_export, PropertyInfo &r_prop_info, bool &r_exported);
+#ifdef TOOLS_ENABLED
static int _try_get_member_export_hint(IMonoClassMember *p_member, ManagedType p_type, Variant::Type p_variant_type, bool p_allow_generics, PropertyHint &r_hint, String &r_hint_string);
#endif