Links: Documentation | Support | Forum
🤖 This asset is part of the Build Helper Bundle. 🤖
What does it do exactly?
1. Hides all unwanted files and directories before build (StreamingAssets, Resources, Plugins).
2. Removes all unwanted game objects and components from the scenes during build.
3. Let‘s Unity finish the build.
4. Reverts step 1 and 2.
Features:
✔️ Exclude from build: Makes excluding files, directories, game objects or components from builds easy.
✔️ Components: Supports excluding single game objects or components too.
✔️ Test mode: Quick iteration! See how removing files affects your project before building.
✔️ No runtime code: Everything is editor only!
✔️ Full Source Code: uses ASMDEFs
✔️ Super lightweight (just a fews classes)
✔️ Supports Unity 2019, 2020, 2021, 2022, 2023, Unity 6, ... LTS
✔️ Exclude by script defines or SubTargets (headless builds).
Isn't Unity excluding unused Assets by default?
Yes, but also no. Here are some use cases for which this tool might come in handy:
● StreamingAssets & Resources: Some folders are not excluded from builds even if their content is not used. /StreamingAssets and /Resources for eaxmple are such folders. Imagine having some high-res and low-res versions of files for different platforms. If you have them located in these special folders then they would all be part of every build.
● More build targets: Imagine you have an Android build for Google Play with a plugin which depends on some Google services. Now you may also want to make a build for the Amazon Store (also Android) but this one does not support the plugin or the Google services you are using. Usually you would make a fork or remove/add those plugins manually for every build. Now this tool allows you to configure which files to build for which target (and more importantly sub-targets like Amazon, GooglePlay, InHouse, ...).
● Some third party sdks hook into OnPreprocessBuild and add quite some stuff which you may not want. For testing ("which one is breaking my build") it is very convenient to just make Unity pretend a certain folder does not exist at all.
● You can also have some GameObjects or Components automatically removed in the build step. Maybe you have a demo or test build which you don't want certain level parts in. Just mark them as "excluded from build" and they are gone. Quick iteration and testing.
Notice
Cloud Build and Asset Bundles are in evaluation. If there is enough demand it will be added (currently untested, they may work already).
!! Package Caveat !!
Only contents of embedded packages can be excluded. Referenced packages need to be embedded before you can exclude parts of them because referenced packages are by definition immutable.
Full source code included
Uses assembly definitions to reduce compile times.
Installation
Download the Asset and import it into your project.
You are done, no additional setup is needed.
Usage
A new menu will be available under "Window > Exclude From Build". Go check out the manual once the import is done.
Info: The settings file will be created under Assets/.
Support
If you have any questions or issues then please write to office[at]kamgam.com.
You can also ask in the dedicated Unity Forum thread. This way others can follow the discussion.
Please be patient, replies may take a few days.
Please include your Asset Store Order Nr in your requests via email.
If you like this asset then maybe you'll like these too:
Skip the hierarchy search. What you click is what you select.
„Duplicate class error“ be gone!
Go back and forth in history with your mouse buttons.
🔑 License Info
This asset requires one license per seat (user who has access to the asset files). If you are a team then please consider buying one seat per Unity user.
Why am I telling you this?
Because most people do not know. In fact any asset found under the Tools category falls under a license type collectively known as Extension Assets(see official license explanation) which differs from the standard (Entity) licenses.
If you have questions about the license then please contact me under office[at]kamgam.com.