GDExtension: Don't deprecate old method of getting script category

This commit is contained in:
David Snopek 2023-10-02 09:14:56 -05:00
parent 0ca8542329
commit cbf939e121
2 changed files with 1 additions and 3 deletions

View File

@ -510,7 +510,7 @@ typedef struct {
GDExtensionScriptInstanceGet get_func;
GDExtensionScriptInstanceGetPropertyList get_property_list_func;
GDExtensionScriptInstanceFreePropertyList free_property_list_func;
GDExtensionScriptInstanceGetClassCategory get_class_category_func;
GDExtensionScriptInstanceGetClassCategory get_class_category_func; // Optional. Set to NULL for the default behavior.
GDExtensionScriptInstancePropertyCanRevert property_can_revert_func;
GDExtensionScriptInstancePropertyGetRevert property_get_revert_func;

View File

@ -676,13 +676,11 @@ public:
if (native_info->get_class_category_func(instance, &gdext_class_category)) {
p_list->push_back(PropertyInfo(gdext_class_category));
}
#ifndef DISABLE_DEPRECATED
} else {
Ref<Script> script = get_script();
if (script.is_valid()) {
p_list->push_back(script->get_class_category());
}
#endif // DISABLE_DEPRECATED
}
}
#endif // TOOLS_ENABLED