You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason this is important is so that null default arguments can be passed into functions in GDExtension. For example in the original GDScript API, PhysicsBody3D.test_move() has a null default argument for the 3rd argument.
An ugly workaround that reportedly works is unsafe { mem::transmute((ptr::null::<Node>(), None::<InstanceId>)) }, although I have not tried it yet with the PhysicsBody3D api.
Also, ideally it seems the 3rd argument of PhysicsBody3D.test_move() should be an Option<Gd> not just a Gd, so there is also a codegen issue here, which maybe is the bigger issue actually.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
This follows a discussion we were having in the Discord.
Gd::from_variant(&Variant::nil()) causes a hard crash.
My backtrace from the crash is:
The reason this is important is so that null default arguments can be passed into functions in GDExtension. For example in the original GDScript API, PhysicsBody3D.test_move() has a null default argument for the 3rd argument.
An ugly workaround that reportedly works is
unsafe { mem::transmute((ptr::null::<Node>(), None::<InstanceId>)) }
, although I have not tried it yet with the PhysicsBody3D api.Also, ideally it seems the 3rd argument of PhysicsBody3D.test_move() should be an Option<Gd> not just a Gd, so there is also a codegen issue here, which maybe is the bigger issue actually.
The text was updated successfully, but these errors were encountered: