- Home /
Does Unity cull away unused assets on build time?
Say for example I have twenty assets and I only use ten of them on my scene. Does that mean that the other twenty are excluded from the build (thus, a smaller, optimized size)?
If Unity does cull, how can I turn this feature off? Or is there an easy way of referencing certain assets so that they won't be culled away?
I'm trying to make an estimation build as fast as possible, that's why I want to have this done.
Thanks!
By assets, I mean prefabs, 2D Toolkit sprite collections, scripts, etc.
Answer by Eric5h5 · Jul 11, 2012 at 02:49 AM
Depends; no scripts are excluded since there's no good way to tell what scripts are referenced or not. Other assets are excluded if they're not referenced, unless they're in the Resources folder. You can't disable this feature.
So if I put the assets in the Resources folder, they'll be included in the build size, right?
I've tried copying my assets to the Resources folder but now I can't build -- my $$anonymous$$ac just crashes. Any thoughts?
You can look at the console to see what the crash log says.
Your answer
Follow this Question
Related Questions
Should I delete all unused assets before build ? 1 Answer
Build size and sharedassets0.assets question. 1 Answer
Distribute terrain in zones 3 Answers
A node in a childnode? 1 Answer
Calling an XML outside of unity 1 Answer