Allow implementing Object::_validate_property() from GDExtension

This commit is contained in:
David Snopek
2023-09-09 13:05:16 -05:00
parent fc99492d30
commit abef8e3874
5 changed files with 29 additions and 1 deletions

View File

@ -689,9 +689,11 @@ public:
}
virtual void validate_property(PropertyInfo &p_property) const override {
if (native_info->validate_property_func) {
// GDExtension uses a StringName rather than a String for property name.
StringName prop_name = p_property.name;
GDExtensionPropertyInfo gdext_prop = {
(GDExtensionVariantType)p_property.type,
&p_property.name,
&prop_name,
&p_property.class_name,
(uint32_t)p_property.hint,
&p_property.hint_string,