When writing a GDExtension project, I find I need the ability to call a function from GDScript on a Node that was created at run time. There could be 100s of these nodes spawned.
Like so : C++ Func --calls–> GDscript Func --returns–> C++ Func Consumes.
But what I need to understand is if I spawn a Node that has attached a GDExtension script onto it, I want to call a function in GDScript on that Node and get the return value for C++. The above reddit code doesn’t include such use case.
Objects that already have a script can be called in the same way that it was in the Reddit post’s explanation, but only the last line will apply. It doesn’t need its script to be set because it already has one.
I may be misunderstanding the post. Does this help? Could you elaborate if it doesn’t?