summaryrefslogtreecommitdiffstats
path: root/modules/mono/mono_gd/gd_mono_internals.cpp
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2021-07-08 16:16:02 -0300
committerreduz <reduzio@gmail.com>2021-07-08 17:08:12 -0300
commit44691448911f1d29d4d79dbdd5553734761e57c4 (patch)
treee94aef364ad141c1e96cb775eec1788b03bd8301 /modules/mono/mono_gd/gd_mono_internals.cpp
parentd4e5fe6c44cecccd4f925707ccd5bbe1511184e5 (diff)
downloadredot-engine-44691448911f1d29d4d79dbdd5553734761e57c4.tar.gz
Redo how instance bindings work
* The harcoded 8 slots are no more and impose limits in the new extension system. * New system is limitless, although it will impose small performance hit with a mutex. * Use a token to request the instance binding. **Warning**: Mono will most likely break as a result of this, will need to be modified to use the new system.
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_internals.cpp')
-rw-r--r--modules/mono/mono_gd/gd_mono_internals.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/mono/mono_gd/gd_mono_internals.cpp b/modules/mono/mono_gd/gd_mono_internals.cpp
index d7df18d5da..d6545d50ec 100644
--- a/modules/mono/mono_gd/gd_mono_internals.cpp
+++ b/modules/mono/mono_gd/gd_mono_internals.cpp
@@ -45,7 +45,7 @@
namespace GDMonoInternals {
void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
// This method should not fail
-
+#if 0
CRASH_COND(!unmanaged);
// All mono objects created from the managed world (e.g.: 'new Player()')
@@ -108,6 +108,7 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
CSharpInstance *csharp_instance = CSharpInstance::create_for_managed_type(unmanaged, script.ptr(), gchandle);
unmanaged->set_script_and_instance(script, csharp_instance);
+#endif
}
void unhandled_exception(MonoException *p_exc) {