- Home /
Inside Resources folder vs outside
Does it matter, if I'm 100% sure that I use all of my game assets, whether they are all going to be in the Resources folder or outside of it?
P.S. I'm not sure what "use" is generally supposed to mean but what I mean by it is for example some textures are just used for a background, some others are attached to a script variable reference, the scripts are all attached as components to some of the gameObjects in the scenes, same with the materials and so on.
Answer by smallbit · May 07, 2015 at 05:12 AM
Every Resources folder will be included in the build (not just Assets/Resources. It means that every script/texture/audio will be packed into apk whether you later use it in the game or not. Than is you are sure you are using the asset in the game by hard reference (i.e. through inspector reference), you better keep it outside of resources. It will still go into build anyway so in theory it doesn't matter whether it is inside of the Resources folder or not, but keeping it outside helps later when you face optimization problem/build size problem. Good practice is to keep in resources ONLY those assets that you load into game on runtime via Resources.Load... . Than everything that is OUTSIDE of resources folder, will NOT be packed into apk unless is referenced in any of the components in the game (i.e. in the inspector on the scene, sprite in the animation file etc..).
Shortly:
what is in the scene should be(but not necessarily need to) outside of resources and goes into apk.
what is outside of resources and not in the scene will not go into apk.
what is in resources and in/not in the scene will go to apk.
What is not used in the game should be outside of Resources folder
Analyze build log to see which assets are packed into build (console -> open editor log)
So basically, no matter if some asset is in the Resources folder or out, if it's being referenced by a script, or used in any scene in general- it's certainly going in the apk?
Also my guess about scenes is that for them is better to be outside the Resources folder but it woudn't make any difference if they are inside because they are always included in the build?
Your answer

Follow this Question
Related Questions
Subfolders with Resources.Load not working 2 Answers
Resource folder doesn't build. Why is it empty? 1 Answer
Special folders in subfolders ? 1 Answer
Is using the resource folder worth it? 4 Answers