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
use godot::prelude::*;#[derive(GodotClass)]#[class(init, base=Node)]pubstructMini{#[base]base:Base<Node>,}#[godot_api]implMini{#[func]fnbar(&self){panic!("error")}}structTesting;#[gdextension]unsafeimplExtensionLibraryforTesting{}
if you attempt to call bar from gdscript, Godot will report that the method does not exist at runtime:
However it will also properly report the error we print:
Note that this does not seem to have any impact outside of run-time.
The text was updated successfully, but these errors were encountered:
lilizoey
added
bug
c: ffi
Low-level components and interaction with GDExtension API
and removed
c: ffi
Low-level components and interaction with GDExtension API
labels
May 1, 2023
lilizoey
changed the title
Panicking in a method will cause godot to believe the method does not exist
Panicking in a method will make godot report that the method does not exist
May 1, 2023
If Godot interprets failed functions calls as "function does not exist", is there realistically something that we can do on our side?
Should we just let the call succeed but still print an error? But then we'd need to return something fitting the signature... and this might have other negative effects?
Uh oh!
There was an error while loading. Please reload this page.
Using this code:
if you attempt to call

bar
from gdscript, Godot will report that the method does not exist at runtime:However it will also properly report the error we print:

Note that this does not seem to have any impact outside of run-time.
The text was updated successfully, but these errors were encountered: