-
-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Describe the project you are working on
Godot
Describe the problem or limitation you are having in your project
Extension development is relatively complex. It requires downloading a separate set of headers, generating them, setting up a compiler toolchain, etc. This happens independent of the usage of Godot from the editor, so development can be relatively difficult.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
The idea is to have something called an "ExtensionDevelopmentPlugin" that eases the project generation, compilation, updating the headers and bindings. This way, everything can be properly done from the editor UI.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The new ExtensionDevelopmentPlugin will handle extension development. To develop an extension, a tab in the ProjectSettings will allow specifying project folders as well as the plugin used. As an example:
| Path | Language |
|---|---|
| res://myextension/terrain | C++ [edit] |
| res://anoherextension | C# [edit] |
| res://yetanother | Rust [edit] |
Creating an extension will make the plugin set up the proper toolchains, debug protocol, build system, build command, and everything needed. If something is not present, the plugin will verify this and let you know that its misconfigured (likely showing an error icon). Running the project, the plugin will also attempt to compile the extension and connect to an IDE for debugging.
It is important to note here that extensions that you already download compiled are not managed or tracked by this system. This system is only for extension development. That said, however, the new extension development plugin system makes the extensions in development interact with the other extensions installed by generating and providing the relevant headers (or API depending on the language) for their use.
As an example, in the config menu for an extension in development, you will be able to see a list of extensions installed and tick which ones you want to have access to. In C++ this means that the proper headers will be generated for using this extension. In C#, it means the proper .cs classes will be created to interact with it.
Finally, the extension plugin will also make sure to compile as many platforms as possible on deploy (in the case of compiled languages) but it will be the developer responsibility to install the required toolchains (there is a separate discussion ongoing about supporting GitHub CI for being able to build for every single platform, as well as also using webassembly optionally to ensure what is compiled runs everywhere, but I think this is material for other proposals).
Stock Godot will only come with support for C++ and C# development, but it is expected that you can download these plugins from the asset library, allowing support for development of other languages such as Nim, Rust, etc.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This is core functionality.
Is there a reason why this should be core and not an add-on in the asset library?
This feature allows the creation of add-ons.