paddy-exe / GDExtensionSummator

The Summator Example from Custom Modules made with the GDExtension system in Godot 4
The Unlicense
173 stars 19 forks source link

Include paths contain godot_cpp #3

Closed bitbrain closed 2 years ago

bitbrain commented 2 years ago

It is recommended by the Godot maintainers that GDExtensions are written as if they are part of the engine code. Therefore, any includes should not contain godot_cpp/:

Example:

#include <godot_cpp/godot.hpp>

should be:

#include <godot.hpp>

The SConstruct file needs updating to ensure this behaviour.

paddy-exe commented 2 years ago

Hey @bitbrain! Thanks for the feedback. From which maintainer did you hear this from? This is very confusing since the official godot-cpp example even does it the this way. If there were a concise documentation like proposed here: https://github.com/godotengine/godot-docs/issues/5618, it would be easier to check up on the correct way to do this. However they even mentioned in the blog post regarding GDExtension that even the official repo isn't structured in the correct way. This project was mainly introduced so others could have another stepping stone to try this new feature out. If there will be any updates concerning GDExtension from the maintainers, I will be glad to update this repo.

bitbrain commented 2 years ago

From which maintainer did you hear this from?

I saw it in an issue thread on Github, I cannot remember who said it.

Since there is no official stance on this anywhere documented let me close this again.