As @Programmer has said, this isn't possible. Everything in your Resources folder is automatically included in your build in order to allow you to load a resource via Resources.load
in your code.
I suggest getting in the habit of not using the Resources folder unless it's necessary to load that resource in via Resources.Load
. This practice will help reduce the number of unused resources that are included in your build. Instead, reference resources to each other using the Unity Inspector, set references to public variables in scripts, and so on.
You can do some refactoring by figuring out what resources are loaded by code by searching for instances of Resources.Load
. Everything else can be moved to a folder not named "Resources" (call it anything else, e.g. "Resources_Managed", to avoid it being considered a special Unity folder).
Note: the official Unity Tutorial for best practices for the Resources folder says not to use the Resources system:
Best Practices for the Resources System
Don't use it. [...]
The ease of the Resources folder makes it an excellent system to rapidly
prototype. However, when a project moves into full production, the use
of the Resources folder should be eliminated.
Note: It doesn't directly answer your question, but this paid Unity asset store plugin may be of use to you: Asset Usage Finder [I have no affiliation with this tool, though I do use it for my projects.]. It can't list all the resources used in a particular scene, but it can tell you where a particular resource is being referenced in your project. (Of course, it can't detect whether a resource is loaded in via Resources.Load
). The source code is also included so it should be possible to write a tool to accomplish what you want (but it would be a lot of work).