diff options
author | David Snopek <dsnopek@gmail.com> | 2023-09-09 13:05:16 -0500 |
---|---|---|
committer | David Snopek <dsnopek@gmail.com> | 2023-09-10 11:17:59 -0500 |
commit | abef8e3874a688600e844b37833230a4163a2dce (patch) | |
tree | 8b8397a5e85925358e13c050ef0f20e8a47f40ef /core/object/script_language_extension.h | |
parent | fc99492d3066098e938449b10e02f8e01d07e2d1 (diff) | |
download | redot-engine-abef8e3874a688600e844b37833230a4163a2dce.tar.gz |
Allow implementing `Object::_validate_property()` from GDExtension
Diffstat (limited to 'core/object/script_language_extension.h')
-rw-r--r-- | core/object/script_language_extension.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/object/script_language_extension.h b/core/object/script_language_extension.h index c7218d99a6..e06f005320 100644 --- a/core/object/script_language_extension.h +++ b/core/object/script_language_extension.h @@ -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, |