diff --git a/include/core/Godot.hpp b/include/core/Godot.hpp index 838473f..5ff38b8 100644 --- a/include/core/Godot.hpp +++ b/include/core/Godot.hpp @@ -357,7 +357,7 @@ void register_property(const char *name, P (T::*var), P default_value, godot_met usage = (godot_property_usage_flags) ((int) usage | GODOT_PROPERTY_USAGE_SCRIPT_VARIABLE); if (def_val.get_type() == Variant::OBJECT) { - Object *o = P::___get_from_variant(def_val); + Object *o = get_wrapper(def_val.operator godot_object*()); if (o && o->is_class("Resource")) { hint = (godot_property_hint) ((int) hint | GODOT_PROPERTY_HINT_RESOURCE_TYPE); hint_string = o->get_class();