0 votes

With this in a script:

extends Node
export(Resource) var resource

Clicking on the node brings up the node in the Inspector panel at right. Under Script Variables, "Resource" is displayed along with an box indicating empty and and arrow to access the New Resource menu. This menu is very long and requires scrolling all the way to the bottom to access the Load command for loading a resource file and for copying and pasting resources.

Is there a way to make this more efficient or skip to the bottom of the menu without scrolling all the way with the middle mouse button?

in Engine by (69 points)

1 Answer

+1 vote
Best answer

export(Resource) litterally tells the editor that this variable can contain any type of resource. So it's showing you everything.
I think it was mentionned somewhere on Github that this should be adressed, like showing a proper window with search option instead, but I can't find it right now.

If you are expecting a particular type of resource, you should specify its type. For example, if you expect a Texture, write export(Texture). If you expect a custom resource type... see https://github.com/godotengine/godot/issues/30694

by (29,042 points)
selected by

Thanks for answer and link to github issue. For anyone else who reads this, unlike what is reported in the github issue, I do not see my custom resource in the list even with class_name defined in the custom resource script. I can find it when clicking on the icon for creating a new resource in memory right under Inspector in the inspector tab.

Is your custom resource part of an addon?

No, my custom resource is not part of an addon.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.