- Home /
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?
Thanks~
Answer by spike1 · Feb 08, 2015 at 11:48 AM
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 :).
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Create / preserve file in asset folder. 2 Answers
How to make game moddable? 1 Answer
Can AssetDatabase.LoadAllAssetsAtPath Load All Assets Recursively? 2 Answers
how do i get weapons onto my game? 2 Answers