Hi!
I know that you got a response on the QA, but I keep this here for future people looking for this.
load()
in GDScript is just a shortcut for ResourceLoader.load()
, so in the C++ bindings it's ResourceLoader::load()
. (so #include <ResourceLoader.hpp>
preload()
isn't really a thing in the API itself. preload()
is just a command for the GDScript compiler to load()
that resource while parsing your code. Because C++ is compiled ahead of time there is no real equivalent, just use ResourceLoader::load()
.
print()
now actually is available with Godot::print()
, but yes, those "special keywords/functions" in GDScript like randf
aren't easily accessible in the Godot API. So we might need to create a wrapper class that contains all of those functions.