From 3f1e75e89c0c3e008569208b8d397c59c767506a Mon Sep 17 00:00:00 2001 From: Karroffel Date: Tue, 25 Jul 2017 00:22:17 +0200 Subject: [PATCH] [NativeScript] bound `new` to ClassDB --- modules/nativescript/nativescript.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/nativescript/nativescript.cpp b/modules/nativescript/nativescript.cpp index 952e8e349c9..493f21d75e8 100644 --- a/modules/nativescript/nativescript.cpp +++ b/modules/nativescript/nativescript.cpp @@ -59,6 +59,8 @@ void NativeScript::_bind_methods() { ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "class_name"), "set_class_name", "get_class_name"); ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "library", PROPERTY_HINT_RESOURCE_TYPE, "GDNativeLibrary"), "set_library", "get_library"); + + ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &NativeScript::_new, MethodInfo(Variant::OBJECT, "new")); } #define NSL NativeScriptLanguage::get_singleton()