summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.cpp
diff options
context:
space:
mode:
authorPaul Joannon <hello@pauljoannon.com>2023-12-22 23:27:13 +0100
committerPaul Joannon <hello@pauljoannon.com>2023-12-22 23:27:13 +0100
commit0818d015db720491684b70cd64ae971bd02cb81c (patch)
treef5f137b8e83f81a267032ca2384f7e202bdd9577 /modules/mono/csharp_script.cpp
parent2d0ee20ff30461b6b10f6fdfba87511a0ebc6642 (diff)
downloadredot-engine-0818d015db720491684b70cd64ae971bd02cb81c.tar.gz
Inspector :warning: when C# props might be out of date
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