GDExtension 是什么?
GDExtension 是 Godot 特有的技术,可以让引擎在运行时与原生共享库交互。你可以通过它来执行原生代码,无需将其与引擎一同编译。
实现这一目标主要有三种方式:
gdextension_interface.h:一组 C 函数接口,用于实现 Godot 与 GDExtension 之间的双向通信。extension_api.json:一份从 Godot API(核心功能)中暴露的 C 函数列表。*.gdextension:一种由 Godot 引擎读取并用于加载 GDExtension 模块的配置文件格式。
Most people create GDExtensions with some existing language binding, such as godot-cpp (for C++), or one of the community-made ones.
版本兼容性
See godot-cpp Version Compatibility, which applies to all GDExtensions.