Is anyone aware of a way to modify prefabs while making a build? Specifically, I want to be able to remove debug and utility scripts for the build, but leave them intact in the project. I had hoped setting HideFlags.DontSaveInBuild on a MonoBehaviour would cause it to be stripped out during builds, but this is not the case. The documentation is unclear on exactly how this value is supposed to function, so I'm not sure if it's broken, or does something different altogether. Ultimately, I'm trying to implement a clean way to have MonoBehaviours that only exist in the Editor. On first glance one may assume using custom Editors or EditorWindows would be the way to go, but there are cases where these are not sufficient. A couple examples: Type-safe, multi-tagging of GameObjects The current tagging system leaves much to be desired. It's based on strings, which are not safe against refactoring, fail at runtime instead of compile time, and can fail silently. Further, you can only tag an object with a single tag. We use MonoBehaviours to tag objects for debug purposes and to identify objects as targets for automated development processes, such as cutting meshes into multiple pieces at build time to allow them to be broken apart at runtime. There is no existing MonoBehaviour to target in this case, since these are just meshes and no additional options are needed. Debug functionality A useful debugging tool is to toss an additional script on an object that adds debug functionality. That functionality may be additional logging, place to stick breakpoints/tracepoints, checking for bad state, forcing LODs, displaying additional debug GUI/objects, etc. I know there are workarounds for this, such as doing a bunch of #if UNITY_EDITOR or if ( Application.isEditor ), destroying the script in Awake, etc. But that just clutters code, is prone to mistakes, and leaves the script for the engine to load, deserialize, and activate.