-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom C# Resource types made through add_custom_type
are missing from inspector create resource menu
#75245
Comments
This issue basically gets obsoleted by #72619. |
The The |
This still happens in 4.1.1, and in GDScript too. It's not just a C# issue.
So I end up using both at once... |
@Zylann
|
@raulsntos my class has no complicated hierarchy, it directly extends Cubemap. However it is under |
Yes, classes under |
The icons of custom resources created with `class_name` and annotated with `@icon` or GDExtensionen resources that have an icon specified in the .gdextension file are not appearing in the `EditorResourcePicker`. The problem is that the `EditorResourcePicker` retrieves the editor theme icon for the resource type and defaults to the `Object` icon if the type wasn't found. This will apply both to `class_name` and GDExtension resources. This solution addresses the issue by replacing the usage of `Control::get_editor_theme_icon` with `EditorNode::get_class_icon` to ensure the correct icon is retrieved for the resource. Additionally, this fix removes the `custom_resources` lookup above that call, as these resources, added through `EditorPlugin::add_custom_type`, were not being included in the allowed types within `_add_allowed_type` in the `EditorResoucePicker`. Currently, these particular custom resources are never displayed in the picker. The related issue is logged here: godotengine#75245. Fixes godotengine#86072.
The icons of custom resources created with `class_name` and annotated with `@icon` or GDExtensionen resources that have an icon specified in the .gdextension file are not appearing in the `EditorResourcePicker`. The problem is that the `EditorResourcePicker` retrieves the editor theme icon for the resource type and defaults to the `Object` icon if the type wasn't found. This will apply both to `class_name` and GDExtension resources. This solution addresses the issue by replacing the usage of `Control::get_editor_theme_icon` with `EditorNode::get_class_icon` to ensure the correct icon is retrieved for the resource. Additionally, this fix removes the `custom_resources` lookup above that call, as these resources, added through `EditorPlugin::add_custom_type`, were not being included in the allowed types within `_add_allowed_type` in the `EditorResoucePicker`. Currently, these particular custom resources are never displayed in the picker. The related issue is logged here: godotengine#75245. Fixes godotengine#86072.
Godot version
4.0.1.stable.mono.official
System information
Windows 11
Issue description
I have a plugin that registers C# resources with
EditorPlugin.AddCustomType
as a workaround to #27470. However the registered resources now don't show up in the create resource menu within the inspector(In the gif below, I've registered two resources called
AlphaResource
andBetaResource
but none of them show up)I suspect it might have something to do with how GDScript resources are getting first class support while C# resources still have yet to receive it.
Steps to reproduce
EditorPlugin.AddCustomType
Minimal reproduction project
https://github.com/Atlinx/Godot-Mono-CustomResourceRegistry
The text was updated successfully, but these errors were encountered: