less than 1 minute read

The readonly prefab utility prevents accidental prefab changes. It does a few key things: Stops accidental changes to existing items Makes items not selectable to prevent accidental movements and other selection based issues Reverts changes automatically with a reported error Provides functionality to enable changes Additionally allows editing in the open prefab mode

Once this system is in place you can have reasonable confidence that the prefabs are not being altered, the settings are remaining in place. This allows for people to alter the prefabs without having to consider issues like setting overrides or scene based links breaking. This ends up being a more robust prefab because you have enhanced guarantees that it is not being modified in many different ways. To enable prefab overrides a top level script can be used to act on the prefab at runtime.

ReadOnly Prefab

Here is an animation of the read only behaviour being triggered:

And here is the flow for altering a prefab: