diff --git a/core/extension/gdextension_interface.cpp b/core/extension/gdextension_interface.cpp index 1a806791c905..2b4a37b1e083 100644 --- a/core/extension/gdextension_interface.cpp +++ b/core/extension/gdextension_interface.cpp @@ -1213,6 +1213,7 @@ static GDExtensionScriptInstancePtr gdextension_script_instance_create(const GDE info_2->get_func = p_info->get_func; info_2->get_property_list_func = p_info->get_property_list_func; info_2->free_property_list_func = p_info->free_property_list_func; + info_2->get_class_category_func = nullptr; info_2->property_can_revert_func = p_info->property_can_revert_func; info_2->property_get_revert_func = p_info->property_get_revert_func; info_2->get_owner_func = p_info->get_owner_func; diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index 08bdf5558115..35602b76ddbe 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -430,6 +430,8 @@ typedef GDExtensionBool (*GDExtensionScriptInstanceSet)(GDExtensionScriptInstanc typedef GDExtensionBool (*GDExtensionScriptInstanceGet)(GDExtensionScriptInstanceDataPtr p_instance, GDExtensionConstStringNamePtr p_name, GDExtensionVariantPtr r_ret); typedef const GDExtensionPropertyInfo *(*GDExtensionScriptInstanceGetPropertyList)(GDExtensionScriptInstanceDataPtr p_instance, uint32_t *r_count); typedef void (*GDExtensionScriptInstanceFreePropertyList)(GDExtensionScriptInstanceDataPtr p_instance, const GDExtensionPropertyInfo *p_list); +typedef GDExtensionBool (*GDExtensionScriptInstanceGetClassCategory)(GDExtensionScriptInstanceDataPtr p_instance, GDExtensionPropertyInfo *p_class_category); + typedef GDExtensionVariantType (*GDExtensionScriptInstanceGetPropertyType)(GDExtensionScriptInstanceDataPtr p_instance, GDExtensionConstStringNamePtr p_name, GDExtensionBool *r_is_valid); typedef GDExtensionBool (*GDExtensionScriptInstanceValidateProperty)(GDExtensionScriptInstanceDataPtr p_instance, GDExtensionPropertyInfo *p_property); @@ -508,6 +510,7 @@ typedef struct { GDExtensionScriptInstanceGet get_func; GDExtensionScriptInstanceGetPropertyList get_property_list_func; GDExtensionScriptInstanceFreePropertyList free_property_list_func; + GDExtensionScriptInstanceGetClassCategory get_class_category_func; GDExtensionScriptInstancePropertyCanRevert property_can_revert_func; GDExtensionScriptInstancePropertyGetRevert property_get_revert_func; diff --git a/core/object/script_language_extension.h b/core/object/script_language_extension.h index 3e8284670cfc..b682efec123a 100644 --- a/core/object/script_language_extension.h +++ b/core/object/script_language_extension.h @@ -670,9 +670,20 @@ class ScriptInstanceExtension : public ScriptInstance { const GDExtensionPropertyInfo *pinfo = native_info->get_property_list_func(instance, &pcount); #ifdef TOOLS_ENABLED - Ref