godotengine / godotengine/godot-cpp
not able to pass arguments to object during construction
Open
discussion
- Dominant language
- C++
- Stars
- 2.7k
- Forks
- 809
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
Unless I'm mistaken, it appears to not be possible to pass arguments to a constructor (new/_init) from gdscript.
one would think you could bind _init and pass arguments to new() from GDscript but that does not seem to be the case.
This is kind of a big deal since it breaks RAII which is one of the most fundamental features of C++. Having to call a function after a class is built, or it is malformed, is not good.
If this is currently possible, it should be added to the example as it will be used by nearly everyone who uses c++.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.