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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom nodes are not exposed to statically compiled languages #632
Comments
No, this is not possible at the moment, unfortunately. This is a somewhat general problem with Godot, where bindings for statically compiled languages like C#, C++ and Rust are sort of "frozen in time" from when that build of Godot was made, and anything exposed by a GDExtension (or even GDScript as seen here) won't be available from these languages. I've been meaning to investigate this since long before I even added the Jolt-specific nodes, but I haven't gotten around to it. My initial hope/ambition was to distribute a separate NuGet package with bindings that somehow utilize There are other alternatives as well, like the approach taken by the Debug Draw 3D extension, where the bindings are generated on-demand by the extension through an editor action and compiled along with the rest of the Godot project. I believe the circumstances for Debug Draw 3D are quite different though, in that the entirety of the API can be expressed as a The workaround in the meantime would be to utilize things like |
Can you get access from a another GDExtension if not from C#? |
Assuming your GDExtension is written in C, C++ or Rust, or any other statically compiled language, you'd have the exact same issue, and you would need to use If it's written in some dynamic language like Python or Lua (that isn't relying on bindings generated by And just be clear, you can still use this extension just fine to power all the default Godot nodes ( |
I'm new to the GDExtensions, but how do different GDExtensions communicate typically? My thinking was if there was a way to access the more advanced features of jolt, for example the simulation rollback. |
There is no such channel of communication between extensions, official or otherwise. The only public symbol that's exposed from the DLL is the extension entry point, which then registers the physics server, the custom nodes, the editor plugin, etc. Rollback in particular is also not something you'll be likely to achieve by just exposing the underlying Jolt stuff to some other extension. See this comment for more details as to why. |
Is it possible to use Jolt types from C#? It is impossible to inherit from JoltGeneric6DofJoint3D for example, as the type doesn't exist or I can't find the right namespace it belongs to..?
The text was updated successfully, but these errors were encountered: