Commit c9882e61 by Ignacio Etcheverry

Mono/C#: Fix assemblies being reloaded a second time unnecesarily

parent 28f0b15c
......@@ -1387,7 +1387,10 @@ bool _GodotSharp::is_runtime_initialized() {
void _GodotSharp::_reload_assemblies(bool p_soft_reload) {
#ifdef GD_MONO_HOT_RELOAD
CSharpLanguage::get_singleton()->reload_assemblies(p_soft_reload);
// This method may be called more than once with `call_deferred`, so we need to check
// again if reloading is needed to avoid reloading multiple times unnecessarily.
if (CSharpLanguage::get_singleton()->is_assembly_reloading_needed())
CSharpLanguage::get_singleton()->reload_assemblies(p_soft_reload);
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment