Exposed asset variables vs Resources

I wonder when I should use which - when is it better to define many exposed variables like Texture and assign them in the Inspector and when it would be a better idea to use Resources. Any advice?

There are different schools of thought on this. My rule is this:

Load it from Resources only if you cannot have an inspector assigned reference. Example: I have a ScriptableObject that contains the version number of my app to match to the asset bundles on the server, I need to load this in script very early in a process and so I use Resources.Load so I don’t have to be in a particular scene. I am probably going to try to remove this use of Resources.

Keep it in resources if it must be in your build. I use this for fall back shaders from Asset Bundles and other uses of shaders which are otherwise not included unless they are in a scene.

Here’s why: everything in Resources is included in your project, including all of the stuff that you used to use but don’t any more. If it’s a scene reference and you changed it, no problem, it will be excluded. I just spent ages writing a pseudo resources script to remove the horrendous pile of junk added to my project by a third party supplied element where they’d put everything (including family member pictures which they were presumably using for testing) in Resources.

When you use Asset Bundles you can’t load from Resources in them.

So my bottom line is this: don’t use Resources if there is any other way of getting what you want. You are asking for trouble down the road.

Resources.Load will load Objects at runtime, and them can be loaded at any time (not precisely at scene load, so you can get faster loading times I presume). If those Object are referenced via inspector over Objects residing on a scene, they will be loaded the time the scene is loaded.

E.g. imagine a scenario where you need to choose between two atlas (high and low definition). Is best to load them via Resources.Load, as if you do via inspector both are going to be loaded.

Hope it helps.