Fix wrapping Object's in GDExtension that aren't exposed

This commit is contained in:
David Snopek 2023-06-09 12:30:39 -05:00
parent 72b59325cf
commit 36f4b99638
2 changed files with 25 additions and 11 deletions

View file

@ -800,17 +800,7 @@ public:
return *_class_name_ptr;
}
_FORCE_INLINE_ const StringName &get_class_name_for_extension(const GDExtension *p_library) const {
// Only return the class name per the extension if it matches the given p_library.
if (_extension && _extension->library == p_library) {
return _extension->class_name;
}
// Otherwise, return the name of the built-in class.
if (unlikely(!_class_name_ptr)) {
return *_get_class_namev();
}
return *_class_name_ptr;
}
StringName get_class_name_for_extension(const GDExtension *p_library) const;
/* IAPI */