summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-01-03 15:43:41 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-01-03 15:43:41 +0100
commit11d1844e6699c2178fc33962912213c125b9dd55 (patch)
tree1c8744c33c5d5a2365eb1bf0651b81bf94a63a69 /modules/mono/csharp_script.cpp
parent91f0789efbb12ed95c523649a9fdceede23b8e30 (diff)
parent0818d015db720491684b70cd64ae971bd02cb81c (diff)
downloadredot-engine-11d1844e6699c2178fc33962912213c125b9dd55.tar.gz
Merge pull request #85869 from paulloz/dotnet-warning-out-of-date-properties
.NET: Add a warning in the inspector when properties might be out of sync
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r--modules/mono/csharp_script.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 8e1587997b..175e213579 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -2246,6 +2246,17 @@ bool CSharpScript::_update_exports(PlaceHolderScriptInstance *p_instance_to_upda
} else {
p_instance_to_update->update(propnames, values);
}
+ } else if (placeholders.size()) {
+ uint64_t script_modified_time = FileAccess::get_modified_time(get_path());
+ uint64_t last_valid_build_time = GDMono::get_singleton()->get_project_assembly_modified_time();
+ if (script_modified_time > last_valid_build_time) {
+ for (PlaceHolderScriptInstance *instance : placeholders) {
+ Object *owner = instance->get_owner();
+ if (owner->get_script_instance() == instance) {
+ owner->notify_property_list_changed();
+ }
+ }
+ }
}
}
#endif