mirror of
https://github.com/godotengine/godot
synced 2024-09-05 12:28:27 +00:00
Merge pull request #82682 from dsnopek/gdextension-dont-deprecate-script-category
GDExtension: Don't deprecate old method of getting script category
This commit is contained in:
commit
dbd4c79c38
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue