-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to load class method XXX #746
Comments
That's probably not the entire error message, is it? Where is the method name? Regarding the code you posted, where is this from? It's using a ton of private/undocumented features, i.e. not a workflow we officially support. To register classes, you currently need
Do you know why it's missing? A quick "fix" is to use the Are you using the latest stable Godot version 4.2.2 and its corresponding |
The libgodot_project allows us to compile Godot as a static library and embed it in an iOS app. The idea is to have a mix of native Swift and a 3D view powered by Godot (rather than having the entire app in Godot). For the code, I created it after exploring the godot-rust codebase. I tried to use the classes provided by godot::classes, like this:
Here is the full message:
Yes, this is not ideal.
I use Godot 4.3 with the patch to create the static library from this repository. You can find the extension_api.json in my hackish fork (I had to fork it because I use Bazel) here. BTW: I have another POC that uses godot-cpp, via https://github.com/migeran/godot-cpp/blob/master/src/godot.cpp#L231 and it works fine. |
As mentioned, these things are not part of the public API, as per our documentation. So you can try to get it running, but it may be overly verbose (this is accessed by generated code after all) and it can break at any time. But my point is: you should not need to do this in the first place. First, you should find out why
Do you use gdext relies on GDExtension's compatibility guarantees, which only exist for stable versions.
Do you have to manually register Godot classes here too? If not, then it shouldn't be necessary in godot-rust either. Let's try to find out what's happening 馃槈 |
馃憢
I am trying to integrate a Godot view into an iOS project using libgodot_project. Below is the Rust code that I use to configure the engine. However,
load_class_method_table
crashes with the errorFailed to load class method AnimatedSprite2D
. I dumped all the registered classes, and it's true that this one is not loaded.I tried to register it, but I got a compilation error saying that
AnimatedSprite2D
does not implementGodotRegisterClass + GodotNotification + GodotToString + ImplementsGodotVirtual
. Is this normal? Is there a way to fix it or work around it?The text was updated successfully, but these errors were encountered: