diff --git a/src/Example.cpp b/src/Example.cpp index 4a214ba..052c109 100644 --- a/src/Example.cpp +++ b/src/Example.cpp @@ -5,6 +5,8 @@ #include "godot_cpp/core/class_db.hpp" #include "godot_cpp/variant/utility_functions.hpp" +#include "Cesium3DTiles/Tileset.h" + #include "Example.h" // Used to mark unused parameters to indicate intent and suppress warnings. @@ -120,6 +122,14 @@ void ExampleRef::_notification( int inWhat ) } } +void Example::testCesiumNative() const +{ + Cesium3DTiles::Tileset tileset; + + godot::UtilityFunctions::print(tileset.TypeName); +} + + //// ExampleMin void ExampleMin::_bind_methods() @@ -591,6 +601,8 @@ bool Example::_has_point( const godot::Vector2 &inPoint ) const void Example::_bind_methods() { // Methods. + godot::ClassDB::bind_method( godot::D_METHOD("test_cesium"), &Example::testCesiumNative); + godot::ClassDB::bind_method( godot::D_METHOD( "simple_func" ), &Example::simpleFunc ); godot::ClassDB::bind_method( godot::D_METHOD( "simple_const_func" ), &Example::simpleConstFunc ); diff --git a/src/Example.h b/src/Example.h index dc876a8..362e912 100644 --- a/src/Example.h +++ b/src/Example.h @@ -51,6 +51,9 @@ class Example : public godot::Control GDCLASS( Example, godot::Control ) public: + + void testCesiumNative() const; + // Constants. enum Constants {