Removing Unused Assets
Here you'll learn how to specify the assets to be force-included in your final build. It's done in the following way:
The Build tool scans all assets of the types specified as wildcards (including location) in the Force-Include list (*.world, *.cs, *.fbx, *.prop, etc.). All dependencies are scanned automatically (an FBX asset shall be checked for all meshes, meshes shall be checked for materials assigned to their surfaces and so on...). Thus, all assets in your project that are used by the assets of the specified types are collected and included in the final build.
You can add as many wildcards to the list, as required. Restore Defaults will reset the list to its initial state.
For each type of asset in the list you can specify whether to include a source file or a runtime generated for it. But be careful, as checking only Runtime for *.png textures will result in ignoring the ones with the Unchanged option enabled (i.e. having no runtime) — they simply won't be included. To check your list against such cases click Check, the following Check List window will open:
This window lists all files found during the scanning. The ones in white are ok, but the ones in red require your attention, for example, you may mistakenly choose to include source for an asset that has a runtime. So, be sure to look through the red ones. The following options are possible:
- [Source and Runtime] — both boxes are checked (both source and runtime files shall be added).
- [Source] — when Use Source is checked and the asset has no runtime (only the source shall be added).
- [Source and it has a Runtime] (shown in red) — when Use Source is checked, but the asset has a runtime (only the source shall be added).
- [Runtime] — when Use Runtime is checked, and the asset has a runtime (only the runtime shall be added).
- [No Runtime] (shown in red) — when Use Runtime is checked, but the asset has no runtime (nothing shall be added).