godot-cpp
godot-cpp copied to clipboard
C++ bindings for the Godot script API
```cpp godot::Godot::print(Basis(Vector3(1, 2, 3), Vector3(4, 5, 6), Vector3(7, 8, 9))) // prints 1, 2, 3, 4, 5, 6, 7, 8, 9 godot::Godot::print(Basis(Vector3(1, 2, 3), Vector3(4, 5, 6), Vector3(7, 8, 9)).y);...
Code in GDScript: ```gdscript extends Node var cpp_class : CppClass = null func _ready(): var callable := Callable(self, "cool_method") print(callable.get_object()) cpp_class = CppClass.new() cpp_class.test_function(cool_method) func cool_method(): pass ``` Code in...
Callable::bind method has no implementation ``` lld-link: error: undefined symbol: public: class godot::Callable __cdecl godot::Callable::bind(class godot::StringName const &) const ```
This is exactly the fix proposed in https://github.com/godotengine/godot-cpp/pull/660 by @kidrigger in order to fix https://github.com/godotengine/godot-cpp/issues/652. The original PR was closed with the code removed somehow, but I believe it is...
I'm trying to connect the `animation_finished` event as follow: ``` void Hero::_register_methods() { //.... register_method("_ready", &Hero::_ready); register_method("AnimationFinished", &Hero::AnimationFinished); } void Hero::_ready() { m_anim_player = get_node("Body/Skeleton/AnimationPlayer"); m_anim_player->connect("animation_finished", this, "AnimationFinished"); } void...
I'm using GDNative documentation of Godot 3.2 and I'm stuck on this section (Compiling the Plugin): https://docs.godotengine.org/en/3.2/tutorials/plugins/gdnative/gdnative-cpp-example.html#compiling-the-plugin Here's the build log: > scons: Reading SConscript files ... scons: done reading...
I wanted to build my extension for Android, so I casually ran `scons p=android` assuming it would tell me what's wrong. Instead I got "Required toolchain not found for platform"....
To implement, would be similar to https://github.com/godotengine/godot/pull/44949
(Duplicated PR of #689 'cause of branch removal) Method that returns enum values as result corrupting memory 'cause Error enum is treated as GDNativeInt instead on int32_t (actual enum size)....
Backport of https://github.com/godotengine/godot-cpp/pull/518 to `3.x`