You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a number of things we end up having to re-explain frequently with godot-cpp, and it would be nice to have a documentation page that explains the design goals of godot-cpp (and explains common pitfalls) so we can link to it, rather than writing a new explanation each time.
These include:
That one of the core design goals of godot-cpp is to have the same API (as much as is possible) as Godot modules, so we won't add new APIs to godot-cpp unless they are also added to Godot. Of course, we already have a number of API differences, but we're working on slowly fixing those, and adding new API differences would be counter productive
memnew() and Ref<T> need to be used when instantiating any Godot classes - plain C++ new or allocating them on the stack will not work
You can't use Godot types as global variables (if they are not allocated later on the heap). This is because they will be created before GDExtension has been initialized
Creating this issue so contributors can take on this task if they'd like :-)
The text was updated successfully, but these errors were encountered:
There are a number of things we end up having to re-explain frequently with godot-cpp, and it would be nice to have a documentation page that explains the design goals of godot-cpp (and explains common pitfalls) so we can link to it, rather than writing a new explanation each time.
These include:
memnew()
andRef<T>
need to be used when instantiating any Godot classes - plain C++new
or allocating them on the stack will not workCreating this issue so contributors can take on this task if they'd like :-)
The text was updated successfully, but these errors were encountered: