Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

引擎的扩展 API

本节将介绍几种你可以用 C++ 代码来扩展引擎的方法。你可以通过创建一个 module 来调用这些 API。需要注意的是,你能对引擎进行的修改远不止这里介绍的这些——本节只是挑选了一些常见且实用的方法来进行展示。

Alternatively, some of the functions presented here are also available through the GDExtension API. You can use them in C++ by creating a godot-cpp based GDExtension, or with any of the community-created GDExtension implementations. Note though that some aspects of the code or directory structures may be different in GDExtension compared to the module APIs.