You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Re-write mono module editor code in C#
Make the build system automatically build the C# Api assemblies to be shipped with the editor. Make the editor, editor player and debug export templates use Api assemblies built with debug symbols. Always run MSBuild to build the editor tools and Api assemblies when building Godot. Several bugs fixed related to assembly hot reloading and restoring state. Fix StringExtensions internal calls not being registered correctly, resulting in MissingMethodException.
This commit is contained in:
@@ -74,15 +74,14 @@ void tie_managed_to_unmanaged(MonoObject *managed, Object *unmanaged) {
|
||||
script_binding.type_name = NATIVE_GDMONOCLASS_NAME(klass);
|
||||
script_binding.wrapper_class = klass;
|
||||
script_binding.gchandle = MonoGCHandle::create_strong(managed);
|
||||
script_binding.owner = unmanaged;
|
||||
|
||||
Reference *kref = Object::cast_to<Reference>(unmanaged);
|
||||
if (kref) {
|
||||
if (ref) {
|
||||
// Unsafe refcount increment. The managed instance also counts as a reference.
|
||||
// This way if the unmanaged world has no references to our owner
|
||||
// but the managed instance is alive, the refcount will be 1 instead of 0.
|
||||
// See: godot_icall_Reference_Dtor(MonoObject *p_obj, Object *p_ptr)
|
||||
|
||||
kref->reference();
|
||||
ref->reference();
|
||||
}
|
||||
|
||||
// The object was just created, no script instance binding should have been attached
|
||||
|
||||
Reference in New Issue
Block a user