Resources folder

Any plan to fully eliminate Resources folder for both URP/HDRP that Resources folder is really bad and need to avoid it? Or is there any path to move it to Addressables currently?

I would like to know whether official will completely remove Resources folder dependency from URP/HDRP. I’m not sure why official still put stuffs into Resources folder while telling us that Resources folder is bad at the same time?

All of those assets are for editor time, not runtime. Resources isn’t good as addressables for runtime, but fine for edit time. (There is no addressables for edit time, for example)

The reason Unity takes such a strict stance on the Resources folder, like here:

is because most developers don’t know how and when it should be used and it’s better to just tell those developers to not use it than try to explain when they should. But in that guide, they explain when it’s fine to use:

3.2. Proper uses of the Resources system

There are two specific use cases where the Resources system can be helpful without impeding good development practices:

  • 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.

  • The Resources folder may be useful in some trivial cases, if the content is:

  • Generally required throughout a project’s lifetime

  • Not memory-intensive

  • Not prone to patching, or does not vary across platforms or devices

  • Used for minimal bootstrapping

Examples of this second case include MonoBehaviour singletons used to host prefabs, or ScriptableObjects containing third-party configuration data, such as a Facebook App ID.

Another case not mentioned in that list is for Editor Resources, like Josh mentioned.

1 Like

I haven confirmed this yet. Will urp resources folder be automatically strip out from player runtime build that I will not find those editor resources at actual game build?

Things in Resources will always be included in builds.

Unity has a solution for storing config data without cluttering the Assets/ folder, it’s ScriptableSingletons. A lot of SRP stuff that should be ScriptableSingletons and menu entries has ended up in Assets/, which causes both cluttering, and the ability to duplicate them and get chaos.

Most of the assets in that screenshot shouldn’t be in a build. If they’re being included it’s a bug.

https://docs.unity3d.com/Manual/SpecialFolders.html