We need a GDExtension cookbook (or: GDExtension is a pain if you don't know enough C++ or your way through the engine internals)
I'm having a hard time bringing a custom type (a struct) from C++ into Godot. I thought that by using types known by the engine would suffice when declaring the fields, but despite doing this and inheriting from godot::Object, GetTypeInfo has issues with my custom type, see this "code fragment" for the error.
ChatGPT has an extensive suggestion to tackle this problem, the issue is that I'm not that knowledgeable in C++ to know what to do to fill the gaps in its suggestion, here is what it said.
All this got me thinking: we should have like a cookbook for GDExtension. I need to know how to do stuff with GDExtension and be productive! I'm here reading the Godot internals and searching for Godot Add-ons on the web that use GDExtension, crossing my fingers the author had the same needs as me and I stumble upon something I can read, understand and copy for my project.
Posted Nov 2, 2023, 1:17 AM UTC