size of final build

I just wonder if I do not use all files under Assets folder in my game, when I distribute a build of the game, all unused ones will be included in the build or Unity is smart enough to exclude these in the final build?

I have this question is that I will frequently change lots of textures in the game, so I put them all in the Assets folder and choose whatever I find appropriate in the scenes. But it will take long time to manually remove unused ones before the final build, and possibly I will forget something or remove the useful ones.

If all unused ones are compiled into the final build, the size of it will become bigger, that is not I want to see.

Thanks.

Unity will only include assets that are referenced (used) by some of the scenes in your game.

In other words, don’t worry. You can have lots of textures in the project, and they won’t be included unless you use them.

Unity is smart!

Cool, I love Unity!

You can see exactly what’s included in your build and their relative size by looking at the console after you’re done. It’s good to do so, you usually can find space to trim. A texture that’s a bit too large, script that was inadvertently included, audio file you forgot to compress, etc.

only what is used AND anything placed in a folder called Resources…