Will the assets be included in the build if I haven't used them?

Let say, I have downloaded some particle sets in the asset stores, but I haven’t used them in my scene. Will they increase the size of my build? say, building apk or ipa?


Under most conditions, the answer is no. Unity will automatically work out which assets are used and include them. However there are a few ways that Unity can include them unconditionally which you should look out for:

  • Scripts - Unity includes all scripts in the final build, due the possibility of them being used at runtime without showing in the editor. This usually doesn’t matter though as scripts are tiny :).
  • Resources - This is the big “gotcha”. If a folder in Unity is called Resources, then Unity will always include it and its contents. This is because resources can be loaded at runtime, so Unity has no way of knowing it they will be used or not.

For more information on reducing the file-size, you should check this link out: http://docs.unity3d.com/Manual/ReducingFilesize.html, it’s where I got most of this info from :).