Black Box – Prefab encapsulation, control Overrides


Turn any Prefab into a "black box" in two clicks, hiding its components and child GameObjects. No unwanted overrides in the scene anymore, saving time for the whole team.


by Ciro Continisio


Price History +

With all the options that Unity's Prefab system offers, even for an expert user it can be easy to make a modification by mistake on a Prefab instance and leave it as an override in the scene, something that can become a source of bugs that are pretty hard to track down.


With Black Box it's possible to prevent overrides to any Prefab by just adding one component. This is something often referred to as "turning a Prefab into a black box", or "encapsulating", "collapsing" or "locking" it (there is no official name).


Since Nested Prefabs came out in 2018, users have been asking to make encapsulation part of regular Prefab workflows. Black Box enables just that, with a single component.


📦 THE RESULT 📦


Once you add the BlackBox component, any Prefab with a number of children GameObjects and components appears as a single object in the hierarchy in the Scene. The user can only change the Transform properties, and enable/disable it. To modify other properties, simply open it in Prefab mode and make changes as usual.


If you have an important property that needs to be shown in the scene, you can add them to a list of revealed properties. These special properties are going to show up on the Prefab root even when the Prefab is locked! (see images) ✨

Any property type that already has an Inspector is supported out of the box!


Documentation

You can preview the documentation and learn all about the functionality before you get the asset.


Version compatibility

Please note that Black Box is only compatible with Unity 2022 and later.