GodotJS icon indicating copy to clipboard operation
GodotJS copied to clipboard

Overridden methods from gdextension

Open GeTechG opened this issue 11 months ago • 3 comments

I know there is no support for C++ at the moment, I think this is just for the future when there is time. My problem is that I have implemented a node on gdextension and in the node the ready() method is used and I inherit from it in js, as I understand the js environment does not know about virtual methods that have been defined, so calling super._ready() gives a natural error that there is no such method, even though it is supposed to be there, and also when I define a method in js it overrides a method of the base class because of which the base class stops working as it should.

GeTechG avatar Mar 08 '25 12:03 GeTechG

👌, I'll dig into it.

ialex32x avatar Mar 10 '25 02:03 ialex32x

Hi @GeTechG , I'm afraid it won't work in godot. I tried the gdextension stuff. The virtual methods registered in gdextension classes are not exposed in ClassDB (and GDExtensionManager). And it doesn't work even in gdscript (can't find these virtual methods).

ialex32x avatar Mar 12 '25 08:03 ialex32x

Hi @GeTechG , I'm afraid it won't work in godot. I tried the gdextension stuff. The virtual methods registered in gdextension classes are not exposed in ClassDB (and GDExtensionManager). And it doesn't work even in gdscript (can't find these virtual methods).

Hmm, strange, how does inheritance work then. You somehow determine that a method is overridden.

GeTechG avatar Mar 12 '25 13:03 GeTechG