diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 8a5be781026..7f618f2eff2 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -1570,9 +1570,19 @@ void CSharpInstance::get_properties_state_for_reloading(Listscript_class->get_field(state_pair.first); - if (!field) + GDMonoField *field = nullptr; + GDMonoClass *top = script->script_class; + while (top && top != script->native) { + field = top->get_field(state_pair.first); + if (field) { + break; + } + + top = top->get_parent_class(); + } + if (!field) { continue; // Properties ignored. We get the property baking fields instead. + } managedType = field->get_type();