@@ -245,6 +245,7 @@ void GDExtension::_register_extension_class(GDExtensionClassLibraryPtr p_library
245245 p_extension_funcs->is_abstract , // GDExtensionBool is_abstract;
246246 true , // GDExtensionBool is_exposed;
247247 false , // GDExtensionBool is_runtime;
248+ nullptr , // GDExtensionConstStringPtr icon_path;
248249 p_extension_funcs->set_func , // GDExtensionClassSet set_func;
249250 p_extension_funcs->get_func , // GDExtensionClassGet get_func;
250251 p_extension_funcs->get_property_list_func , // GDExtensionClassGetPropertyList get_property_list_func;
@@ -280,6 +281,7 @@ void GDExtension::_register_extension_class2(GDExtensionClassLibraryPtr p_librar
280281 p_extension_funcs->is_abstract , // GDExtensionBool is_abstract;
281282 p_extension_funcs->is_exposed , // GDExtensionBool is_exposed;
282283 false , // GDExtensionBool is_runtime;
284+ nullptr , // GDExtensionConstStringPtr icon_path;
283285 p_extension_funcs->set_func , // GDExtensionClassSet set_func;
284286 p_extension_funcs->get_func , // GDExtensionClassGet get_func;
285287 p_extension_funcs->get_property_list_func , // GDExtensionClassGetPropertyList get_property_list_func;
@@ -315,6 +317,7 @@ void GDExtension::_register_extension_class3(GDExtensionClassLibraryPtr p_librar
315317 p_extension_funcs->is_abstract , // GDExtensionBool is_abstract;
316318 p_extension_funcs->is_exposed , // GDExtensionBool is_exposed;
317319 p_extension_funcs->is_runtime , // GDExtensionBool is_runtime;
320+ nullptr , // GDExtensionConstStringPtr icon_path;
318321 p_extension_funcs->set_func , // GDExtensionClassSet set_func;
319322 p_extension_funcs->get_func , // GDExtensionClassGet get_func;
320323 p_extension_funcs->get_property_list_func , // GDExtensionClassGetPropertyList get_property_list_func;
@@ -456,6 +459,13 @@ void GDExtension::_register_extension_class_internal(GDExtensionClassLibraryPtr
456459#endif
457460
458461 ClassDB::register_extension_class (&extension->gdextension );
462+
463+ if (p_extension_funcs->icon_path != nullptr ) {
464+ const String icon_path = *reinterpret_cast <const String *>(p_extension_funcs->icon_path );
465+ if (!icon_path.is_empty ()) {
466+ self->class_icon_paths [class_name] = icon_path;
467+ }
468+ }
459469}
460470
461471void GDExtension::_register_extension_class_method (GDExtensionClassLibraryPtr p_library, GDExtensionConstStringNamePtr p_class_name, const GDExtensionClassMethodInfo *p_method_info) {
0 commit comments