Do textures for materials need to be in Resources folder also?

So I’ve been trying to reduce the build size of my project by removing files from the Assets/Resources folder, and i was wondering if the texture (image) files for the materials I’ve used on my models are required to be in the Resources folder in order for the material to work properly.

Bearing in mind I’m just moving the file, not deleting it entirely. Have noticed some oddities sometimes with Unity when I move a file from one place to another.

Any help, or point in the right direction, would be a great help. Thanks :slight_smile:

The Resources folder is primarily for adding assets that you want to load dynamically at runtime. You definitely don’t want to store anything in there that isn’t used at runtime. When you call things like LoadResource(“texture”), it looks in the Resources folder. Unity guarantees it will copy the Resources folder to your app. Anything outside of the Resources folder will only be copied if it has a direct reference to a scene in the editor.

Here’s a link to the help page:

Regarding moving files, if you move them in the Editor, you are safe (for the most part). If you move them in Windows Explorer or Mac Finder, not so much. Also, I noticed that having the meta data enabled for version control leads to less unrecoverable loss of scenes. I think that may be on by default now days though.

To address your specific question, your textures will be fine if they are assigned to a shader that is assigned to a material that is referenced by a prefab or existing object, and I also believe the code is searched for any material overrides by name (not certain, but I don’t recall ever having issues doing that with missing textures on the final output).