diff options
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r-- | modules/mono/csharp_script.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 9520598f5c..4316f38bd2 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -109,7 +109,7 @@ Error CSharpLanguage::execute_file(const String &p_path) { return OK; } -extern void *godotsharp_pinvoke_funcs[138]; +extern void *godotsharp_pinvoke_funcs[164]; [[maybe_unused]] volatile void **do_not_strip_godotsharp_pinvoke_funcs; void CSharpLanguage::init() { @@ -705,19 +705,14 @@ void CSharpLanguage::pre_unsafe_unreference(Object *p_obj) { void CSharpLanguage::frame() { if (gdmono && gdmono->is_runtime_initialized() && gdmono->get_core_api_assembly() != nullptr) { - const Ref<MonoGCHandleRef> &task_scheduler_handle = GDMonoCache::cached_data.task_scheduler_handle; - - if (task_scheduler_handle.is_valid()) { - MonoObject *task_scheduler = task_scheduler_handle->get_target(); - - if (task_scheduler) { - MonoException *exc = nullptr; - CACHED_METHOD_THUNK(GodotTaskScheduler, Activate).invoke(task_scheduler, &exc); + MonoException *exc = nullptr; + gdmono->get_core_api_assembly() + ->get_class("Godot", "ScriptManager") + ->get_method("FrameCallback") + ->invoke(nullptr, &exc); - if (exc) { - GDMonoUtils::debug_unhandled_exception(exc); - } - } + if (exc) { + GDMonoUtils::debug_unhandled_exception(exc); } } } |