godotengine / godotengine/godot
Custom resource types are unable to be imported.
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.2-stable
### System information
Godot v4.2.stable - Linux Mint 21.1 (Vera) - X11 - Vulkan (Forward+) - integrated Intel(R) Iris(R) Plus Graphics (ICL GT2) () - Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz (8 Threads)
### Issue description
When using a `EditorImportPlugin`, the `_get_resource_type()` function cannot return a custom resource type. This means that files cannot be dragged into inspector properties of a custom resource type.
### Steps to reproduce
1. Create editor plugin
2. Follow [import plugin documentation](https://docs.godotengine.org/en/stable/tutorials/plugins/editor/import_plugins.html)
3. Make a custom resource
4. Change return value of `_get_resource_type()` to `"CustomResource"`
5. _Cannot get class "CustomResource"_
### Minimal reproduction project (MRP)
[test_project.zip](https://github.com/godotengine/godot/files/14729143/test_project.zip)
Contributor guide
Research direction
Start with the linked minimal reproduction project and the EditorImportPlugin import-plugin documentation, focusing on the _get_resource_type() entry point and its "CustomResource" return value. Confirm the failure in Godot 4.2, then trace how the custom resource type is resolved; done means the type is recognized and its files can be dragged into custom resource inspector properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100